This is a sample Node.js service using MongoDB as the database, with Mongoose as the ODM.
- Node.js (v14.x or later)
- MongoDB instance (either locally or via a cloud service like MongoDB Atlas)
-
Clone the repository:
git clone https://github.com/RaulArmasBenavides/TantooServiceRestNode
-
Navigate to the project directory:
cd TantooServiceRestNode
-
Install dependencies:
npm install
-
Set up your environment variables: Create a
.env
file in the root of the project and provide the following variables: For devDB_CNN2=<your MongoDB connection string>
Example MongoDB connection string:
DB_CNN2=mongodb+srv://<username>:<password>@cluster0.ie9pfbp.mongodb.net/<dbname>?retryWrites=true&w=majority
-
Start the service:
npm start
- Nodemon is used for development purposes. It automatically restarts the server when file changes in the directory are detected.
npm start
This project is licensed under the ISC License.