This software was built using Express (with Node.js) and Mongoose as the MongoDB driver. The API allows you to perform CRUD operations on Authors, Articles, and Tags. It also allows you to manage users based on their roles and add thumbnails to articles.
- Navigate to the project directory:
cd PatchedWeb-Nodejs-Blog-api/
- Create a new .env file:
touch .env
- Open the .env file and add the following environment variables:
DB_URI= //ADD YOUR MONGODB DB URI HERE //
PORT= /// YOUR PORT NO //
JWT_SECRET= //your_secret_key //
DEV_ORIGIN_HOST=http://localhost:9000
ADMIN_CLIENT_HOST=//domain name //
APP_CLIENT_HOST= // domain name //
- Install dependencies:
npm install
5.Run the server:
npm run dev