-
Create a robust and scalable API with Express and modern technologies, following best practices (see: node best practices)
-
Improved code maintainability and type safety with TypeScript.
-
Integrating and interacting with a MongoDB database, using Mongoose (ODM)
-
Organizing the codebase using controllers, middlewares, and routes for better maintainability.
-
Implementing authentication mechanisms for user management.
Node.js & Express.js:
Node for the runtime environment for executing JavaScript on the server-side and Express framework for building robust and scalable APIs.
MongoDB & Mongoose:
A NoSQL database using Mongoose ODM (Object Document Mapper) for MongoDB, straightforward way to interact with the database.
TypeScript:
A superset of JavaScript that adds static typing and other features for better code quality.
Lodash:
A utility library providing useful functions for working with arrays, objects, and more.
Nodemon:
A utility that monitors for changes in files and automatically restarts the server.
Body-parser:
Middleware for parsing incoming request bodies.
Compression:
Middleware for compressing responses to reduce response times.
Cookie-parser:
Middleware for parsing cookies attached to the client's request.
Cors:
Middleware for handling Cross-Origin Resource Sharing.
Node version 18.15.x
git clone
npm i
src/index.ts
const MONGO_URL = ''; // INSERT YOUR DB URI
Running commands with npm npm run [command]
command | description |
---|---|
start |
Starts a development instance of the app |