TaskManager is a Node.js application for managing tasks. This webapp built with Expressjs, Mongoose(MongoDB), Bootstrap 5. This README will guide you through the process of installing Node.js, setting up the Node.js server, configuring the environment variables, and setting up MongoDB locally, running the project in your browser.
⚠️ Disclaimer:This project is created solely for Academic purposes and is intended for learning and demonstration only.
It is not designed or authorized for commercial use.
- Node.js (v14.x or above)
- npm (v6.x or above)
- MongoDB (v4.x or above)
- Download the Node.js installer from the official website.
- Run the installer and follow the instructions.
- Verify the installation by running the following commands in your terminal:
node -v npm -v
- Download and install GIT from official website.
- Open your terminal.
- Clone the repository using the following command:
git clone https://github.com/Atanu-P/taskmanager.git
- Navigate to the backend folder inside project directory to install required dependencies:
cd taskmanager && cd backend
- Install the required Node.js dependencies, all the dependencies listed in
package.json
file within backend folder:npm install
- Create a
.env
file in the root directory of the project. - Install and setup MongoDB using Compass or CLI. Follow the instruction below Setting up MongoDB Locally.
- Add the following environment variables to the
.env
file or use.env.sample
as reference:PORT=3000 MONGODB_URI=mongodb://localhost:27017/taskmanager ACCESS_TOKEN_SECRET=secretword ACCESS_TOKEN_EXPIRY=1d REFRESH_TOKEN_SECRET=secretword REFRESH_TOKEN_EXPIRY=10d
- Start the server using the following command:
cd backend && npm start
- The server should now be running on
http://localhost:3000
.
-
Open your browser and navigate to
http://localhost:3000
. -
Test api url
http://localhost:3000/api
.
- Download the MongoDB Community Server from the official website.
- Download the Compass (MongoDB GUI) from official website.
- You can use Compass GUI or CLI to setup database for this project.
- Follow the below instructions using CLI.
- Open a terminal and run the following command to start the MongoDB server:
mongod
- MongoDB should now be running on
mongodb://localhost:27017
.
- Open another terminal window.
- Start the MongoDB shell using the following command:
mongo
- Create the
taskmanager
database:use taskmanager
- You can now interact with the
taskmanager
database.