Express File Structure Flashcards
Name the files and folders needed for an Express project.
- Node Modules folder
- Routes folder
- Controllers folder
- Public folder
- app.js file
- server.js file
- package.json file
What is stored in the Node Modules folder?
NPM dependencies
What is stored in the routes folder?
All the application URL routes divided into files for each resource
What is stored in the controllers folder?
All the controllers for the application
What is stored in the public folder?
Static files, like HTML, CSS, JS frontend files, images, etc.
What is in the app.js file?
All the app middleware, i.e., the entire middleware stack used
What is stored in the server.js file?
It acts as the app entry point, and contains only development/production configurations and the port listener
What is stored in the package.json file?
Information about the application similar to a manifest.json file