This is a starter/boiler-plate I use for creating express apps. It gives a minimal REST API with token-based authentication
npm i
Please make sure the frontend server is also running in dev mode
npm start
The API will now be available at http://localhost:3000/api
Please build the frontend and copy the files from the dist
folder there to the public
folder here. Then run the following command
npm run prod
Now go to http://localhost:3000/
- ExpressJS: The most popular NodeJS microframework
- Sequelize: A good ORM for NodeJS
- SQLite: A good small database that is used so that much setup is not required for trying this out. In production I switch to MariaDB
- JWT: A standard for signing JSON tokens and verifying them
- Nodemon: A good tool for development and keeping your server running forever
- Morgan: Simple logger for ExpressJS
- ESLint: The source code linter used to notice mistakes and a few styling rules
- Postman: Tool used for testing the API while development
The code is provided under the ISC license