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