This Node.js project provides a CRUD API for managing a employee list.
The Employee List project is a Node.js-based API allowing users to perform CRUD operations (Create, Read, Update, Delete) on employee in a employee table list. The API serves as an efficient way to manage employee.
- Node.js (Minimum version 12. and above*)
-
Clone the repository:
git clone https://github.com/afsarahmad0786786/v2solutions_backend_boilerplate.git
-
Copy the environment variables file:
cp .env.example .env
Create .env file in root directory and Update the .env
file with the following details:
- MONGO_URI: Add your MongoDB URI string.
- JWT_TOKEN: Set your JSON Web Token secret.
- PORT: Set your PORT to 8080.
- EMAIL_ENCRYPTED: Provide enctypted value for accessing/sending email.
- EMAIL_AUTH_SECRET_KEY: provide secret key which is used for encryption.
- EMAIL: provide email id from which email will be sent.
-
Install project dependencies:
npm install
The Employee
schema represents the structure of a employee list in the database. and User
schema reresents the structure of user list in the database.
name
: Unique identifier for the task.email
: email of the employee.dob
: dob of the employee.designation
: designation of the employeeeducation
: education of the employee.
- The swagger will be run on
http://localhost:8080/api-docs/
Start the server:
npm start