Using the Admin Panel API you can add / modify / read / delete companies and their employees
-
[NodeJS @16.15.1] - JavaScript runtime built on Chrome's V8 JavaScript engine
-
[Express @4.18.1] - Fast, unopinionated, minimalist web framework for Node.js
-
[MongoDB] - Open source NoSQL database management program
-
[mongoose @6.3.6] - elegant mongodb object modeling for node.js
-
[express-validator @6.14.1] - Middlewares that wraps validator.js validator and sanitizer functions
-
[JSON Web Token @8.5.1] - RFC 7519 method for representing claims securely between two parties
-
[Swagger UI Express @4.4.0] - Serve auto-generated swagger-ui generated API docs from express
1. First of all you need to clone repository from github:
git clone https://github.com/Saba-Var/company-employees-api.git
2. Next step requires install all the dependencies
npm install
or
yarn install
3. Copy .env
cp .env.example .env
4. If you want you can also change default configuration of .env file and connect to mongodb
MONGO_DATABASE=adminPanel
MONGO_PROTOCOL=mongodb
MONGO_HOST=localhost
MONGO_PORT=27017
MONGO_CLUSTER=''
SERVER_PORT=3000
ACCESS_TOKEN_SECRET=secret-text
USER_PASSWORD=***
USER_EMAIL=***
5. after that you can run Admin Panel API from terminal:
npm run dev
6. To create new user from the terminal run the following command:
npm run user:create
To see swagger documentation visit localhost:3000/api-docs/
├─── readme
├─── src
│ ├── bin
│ ├── config
│ ├── controllers
│ ├── middlewares
│ ├── models
│ ├── routes
│ └── schemas
- .env
- .eslintrc.json
- .gitignore
- .prettierrc.json
- package.json
- README.md