/Module_5

Primary LanguageJavaScript

Module_5

Week 5

  1. In your server's index.js, add to the same routes your created in Module_4 by adding the following routes:

    /trucks This will be a POST route (do not replace the GET version of this route) that uses the trucks module to add a truck to the foodTrucks list.

    /trucks/:name This will be a DELETE route (do not replace your GET version of this route) that uses the trucks module to remove a truck from the foodTrucks list.

  2. Refactor all your routes into a separate, Express router module. This code will go into truckRoutes.js in the routes folder. This module should be required into your server file and used accordingly. Sample usage:

    var truckRouter = require('./routes/trucksRoutes');

  3. Your project must include using the /public files from the origina repo and the static files (e.g. index.html) inside it so that visiting the / , or root path should display a form that calls and works with the routes you implement for your server.

  4. Include your .eslintrc file as part of your repo. Your code should be lint-free based on your lint configuration.

  5. Use a .gitignore file in your project locally, adding 'node_modules' to the file to prevent the inclusion of node_modules in your repo.