This contains all the API implementation
- Backend Framework: Express.js
- Database: Mongodb
- Upload Library: Multer
- Test: Jest & Supertest
Clone the project
git clone <Repo URL>
Go to the project directory
cd qode-be
Install dependencies
npm install
Start the server:
this command will automatically start both the frontend as well as express server.
npm run dev
API server
http://localhost:3000/
POST /upload
{
filename: '1694268576749.png',
url: 'http://localhost:3000/1694268576749.png',
comment: 'MyImage',
_id: new ObjectId("64fc7ca0fb1d02fcbad4710c"),
__v: 0
}
GET /getPhoto
{
filename: '1694271453827.jpg',
url: 'http://localhost:3000/1694271453827.jpg',
comment: 'asd',
date: 2023-09-09T14:57:33.833Z,
_id: new ObjectId("64fc87dd22b0eaf40836fd35"),
__v: 0
}
To run tests
npm run test
Current Test Case Result:
Current Test Coverage Result: