A simple yet convenient expressjs route handler made so it will be easy for you to start your next express backend as soon as possible.
- MongoDB database support included with mongoose and a connector function to connect to your database. A seperate folder for writing schemas also is included.
- Easy version handling by adding api version folder for each version.
- folders for each type of route (create, read, update, delete) you can add more like auth for example.
- Works with vercel
- Built in errorHandler and folder for writing your middleware
- Enables trust proxy if running in production environment so express will return the correct ip instead of the server proxy IP.
- Beautiful request logging powered by morgan
- Clone this repository
- create .env file and add a variable called
MONGODB_URI
which should be equal to your mongoDB database URL - run
node index.js
and the server should start.
note: when running in production make sure to add a environment variable caled NODE_ENV
which should be equal to production
for better optimization
Got any improvements? submit a pull request.