week16C
The program/API has Four major modules;
- An route for configuring the application,
- A config for specifying the connection to the database,
- A server.js for spinning up the node server on a specific port of your choice. with some simple defined routes like get, post, delete, and put.
- And Package.json for carrying node package info.
- Then other folders and files carry the business logic of your program/API.
HOW I CREATEd this API
- create a folder
- create a package.json file into it.
- install npm modules 3b. install dependencies into it.
- create a READme File as seen here.
- create a server.js file
- create sub-folders: Config, Controllers, Models and Routes etc. 6a. All the configurations for the app GOES into Config's folder. 6b. All the Controllers for the app goes into Controller's folder 6c. All the Models for the app goes into Model's folder. 6d. All the Routes for the app goes into Route's folder. etc.