Setting up the project
Follow these steps to set up your project:
- In the exercise files of this chapter, you will find two directories,
initialandfinal. Thefinaldirectory contains the final search engine template whereas theinitialdirectory contains the files to quickly get started with building the search engine template. - In the
initialdirectory, you will findapp.jsandpackage.json. In thepackage.jsonfile, place this code:{ "name": "SearchEngine-Template", "dependencies": { "express": "4.13.3", "chance": "1.0.3" } }Here, we are listing
Express.jsandChance.jsas dependencies. Express will be used to build the web server whereasChance.jswill be used to generate random textual data to populate the template's search results. - Now, run
npm installinside theinitialdirectory to download the packages.Inside the
initialdirectory, you will find a directory namedpublic, inside which all the...