- User Account Creation
- Add to Cart
- Full Crud Operations for Product Listing
- Authentication
- Comprehensive Testing
- Deployed on AWS EC2
- Node.js (LTS version)
- TypeScript
- Mongoose ORM
- MongoDB
- Supertest (for testing)
- Express.js (for routing)
-
Clone the repository:
https://github.com/owujib/backend-engineer-test
-
Navigate to the project directory:
cd backend-engineer-test
-
Install dependencies:
npm install
npm run build
-
Create a
.env
file in the project root and configure the following environment variables:NODE_ENV=development PORT=5000 JWT_SECRET=nasecreatooo DB_URL='mongodb://localhost:27017/db'
Use
docker db
, for testing.
Authentication in this project Json webtokens is being used for authentication
The application is thoroughly tested using the Supertest testing framework.
To run tests, use the following command:
npm test
I was having some critical errors uploading to render and railway.app, so I decided to create an EC2 instance for the deployment, also there was no time to set up any CI/CD pipeling I just used pm2 on my vm :)
The API is deployed on Heroku and can be accessed at http://18.130.138.176.
You can find the Postman collection for testing the API at the following URL: