Node.js, Express.js, Mongoose, and MongoDb
This is an API that implements the CRUD endpoints. It creates, reads, updates and deletes data from the database with data including the company name, company’s head office,company e-mail, company phone, number of employees and the company's website
- Make sure to have Git and Node.js installed on your computer
- Clone the project by running:
git clonehttps://github.com/JudySeyram/Tech-Companies` - cd into the project and run
npm install - create a
.envfile in the root folder and copy the content in the.env.exampleinto it. - run
npm startto start the project.
These are the HTTP response codes used in this project:
| Status Codes | Indication |
|---|---|
200 |
This OK status code indicates that a request has succeeded |
400 |
This bad request error status code indicates that the request sent to the server is incorrect |
404 |
This not found error status code indicates that the resource is not found. |
500 |
This internal server error status code indicates that something has gone wrong on the web server |
The routes featured in this project:
| API routes(url) | Method | Description |
|---|---|---|
| / | GET |
Api home page |
| /getOne/id | GET |
Get a company by ID |
| /post | POST |
Add a company to the database |
| /update/id | PATCH |
Update a company information by ID |
| /delete/id | DELETE |
Delete companyfrom database |
👤 Author:
| Github | |
|---|---|
| @judyseyram | Judith Amegbe |