This project is a Node.js API backend designed for learning purposes. It uses Express.js for the server framework and MongoDB for the database. The junior developer is learning how to build backend APIs with these technologies.
- Node.js runtime environment
- Express.js for building RESTful APIs
- MongoDB as the database, connected via Mongoose ODM
- Babel for using modern JavaScript (ES6+) features with backward compatibility
- Nodemon for automatic server restarts during development
To install the necessary packages, run:
npm installThis will install the following key dependencies:
- express
- mongoose
- body-parser
- nodemon (for development)
- @babel/core, @babel/cli, @babel/node, @babel/preset-env (for ES6+ support)
Start the development server with:
npm startThis runs the server using nodemon and babel-node for live reload and ES6+ support.
The API will be available at http://localhost:3000.
Make sure MongoDB is installed and running locally. The API connects to the database at:
mongodb://localhost:27017/CRMdb
- Deprecated MongoDB connection options
useNewUrlParseranduseUnifiedTopologyhave been removed to avoid warnings. - The project uses ES6 module syntax, enabled by Babel.
- Understand how to set up a Node.js backend with Express.js.
- Learn how to connect and interact with MongoDB using Mongoose.
- Use Babel to write modern JavaScript that runs in Node.js.
- Manage development workflow with Nodemon.