You can check this API live on this link : https://calm-dress-bear.cyclic.app/
This is a RESTful API for a task management application. It allows users to create, read, update, and delete tasks, and associate them with categories.
- Node.js
- npm
- MongoDB
- Nodemon (For dev mode)
- Clone this repository:
git clone https://github.com/barakgoren/ExpressJS-Final.git
- Install dependencies:
npm install
-
Create a new ".env" file and insert the fields:
- JWT_SECRET_KEY - for configuring JWT.
- USER_DB - The user name to your Atlas if you are using atlas
- PASS_DB - The password to your Atlas if you are using atlas
- ADMIN_PASS - This is the password you use to set yourself as an Admin.
-
Modify the MongoDB URL to your Atlas URL or local URL on the app.js file.
mongoose.connect(`http://localhost:27017`) .then(() => { console.log('Connected to MongoDB'); }) .catch(err => { console.log(err); })
- Start the server with Nodemon on Development mode:
npm run dev
- Start the server with Node.js:
npm start
{
"name": "your name",
"email": "[email protected]",
"age": 30,
"password": "your password"
}
{
"email": "[email protected]",
"password": "your password"
}
{
"title": "Task name",
"category": "Category ID",
"dueDate": "yyyy-MM-dd",
"description": "Task description"
}
{
"name": "Category name",
"description": "Category description"
}
Contributions, issues and feature requests are welcome. Feel free to check issues page if you want to contribute.