Use this boilerplate repository to kickstart your ExpressJS project
This repository follows the following folder structure:
- Models - Contains all the ORM models (called
Schemas
in mongoose) - Public - Contains all static content like images, client-side javascript, and css
- Controllers - Contains the functions
- Routes - Contains the Express routes
- Views - Contains the view templates (like ejs, jade or other templating engine)
- Logs - Contains the generated log files
- package.json- File containing metadata of dependencies
To use the repository, follow the steps as described.
- Clone the repository
- Install the repositories using the following command
npm install
- Start the project using
node app.js OR npm start
Another way to create a basic express app is to use the npm module "express-generator"
Check out the steps and the generated app here: Express Generator Example
Happy coding!