This is a boilerplate project used for starting new projects!
Complete the following steps to start a new project (NEW-PROJECT-NAME):
- Clone this repository to your local machine
git clone BOILERPLATE-URL NEW-PROJECTS-NAME && cd $_ && rm -rf .git && git init
- Install the node dependencies
npm install
- Move the example Environment file to
.env
that will be ignored by git and read by the express servermv example.env .env
- Edit the contents of the
package.json
to use NEW-PROJECT-NAME instead of"name": "express-boilerplate",
- Hide Secrets (
proccess.env.VARIABLE
) - Ensure standard Node.js .gitignore is used
- Check for minimal logging in production environment
- Remove unnecessary console logs
- Ensure sensitive server errors are hidden using middleware
- Generate different API TOKENS for development and production
- Specify Node version in package.json
- Audit packages (
npm audit
|npm audit --fix
)
Start the application npm start
Start nodemon for the application npm run dev
Run the tests npm test
When your new project is ready for deployment...
- Add a new Heroku application with
heroku create
- Run
npm run deploy
which will push to this remote's master branch.