Skip to content

owujib/backend-engineer-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation


Product api

Table of Contents

Features

  • User Account Creation
  • Add to Cart
  • Full Crud Operations for Product Listing
  • Authentication
  • Comprehensive Testing
  • Deployed on AWS EC2

Tech Stack

  • Node.js (LTS version)
  • TypeScript
  • Mongoose ORM
  • MongoDB
  • Supertest (for testing)
  • Express.js (for routing)

Getting Started

Installation

  1. Clone the repository:

    https://github.com/owujib/backend-engineer-test
  2. Navigate to the project directory:

    cd backend-engineer-test
  3. Install dependencies:

    npm install
     npm run build

Configuration

  1. 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

Authentication in this project Json webtokens is being used for authentication

Testing

The application is thoroughly tested using the Supertest testing framework.

To run tests, use the following command:

npm test

Deployment

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.

Postman Collection

You can find the Postman collection for testing the API at the following URL:

Postman Collection


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published