- NodeJs
- Database (MongoDB) Free Cluster
Create a .env file to store your credentials. Example below:
PORT=5000
MONGODB_URI=mongodb+srv://Jedybrown:<password>@cluster-nodejs-blog.cl4hvbg.mongodb.net/blog?retryWrites=true&w=majority&appName=Cluster-nodejs-blog
MONGODB_PASSWORD=<password>
JWT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To install and run this project - install dependencies using npm and then start your server:
$ npm install
$ npm run dev
NodeJs Database (MongoDB) Free Cluster
Create a .env file to store your credentials. Example below:
PORT=5000
MONGODB_URI=mongodb+srv://name:<password>@cluster-nodejs-blog.cl4hvbg.mongodb.net/blog?retryWrites=true&w=majority&appName=Cluster-nodejs-blog
MONGODB_PASSWORD=<password>
JWT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To install and run this project - install dependencies using npm and then start your server:
$ npm install
$ npm run dev
To deploy this application to Render from your GitHub repository, follow these steps:
Name: J-blog
Language: NodeJs
Branch: main
Region: Oregon (US West)
Root Directory: ./
Build Command: npm install
Start Command: node app.js
PORT=5000
MONGODB_URI=mongodb+srv://name:<password>@cluster-nodejs-blog.cl4hvbg.mongodb.net/blog?retryWrites=true&w=majority&appName=Cluster-nodejs-blog
MONGODB_PASSWORD=<password>
JWT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Once you have configured the service with the above settings and environment variables, Render will automatically deploy your application from the specified branch in your GitHub repository.