Skip to content

Latest commit

 

History

History
102 lines (80 loc) · 2.58 KB

README.md

File metadata and controls

102 lines (80 loc) · 2.58 KB

E-commerse Backend API

knights-ecomm-be CI    Coverage Status    Version

Description

This repository contains an E-commerce APIs, serving as backend for an E-commerce frontend application, It powers the functionalities for the frontend, such as storing, retrieving, deleting data and much more.

Documentation

List of endpoints exposed by the service

Setup

  • to use loggers in program use below functions
logger.error('This is an error message');
logger.warn('This is a warning message');
logger.info('This is an informational message');
logger.debug('This is a debug message');

Technologies used

  • Languages:
    • TypeScript
  • Package manager:
    • npm
  • Stack to use:
    • Node.js
    • Express.js
    • PostgresSQL
  • Testing:
    • Jest
    • Supertest
  • API Documentation
    • Swagger Documentation

Getting Started

  • Clone this project on your local machine
    git clone https://github.com/atlp-rwanda/knights-ecomm-be.git
    
  • Navigate to project directory
    cd knights-ecomm-be
    
  • Install dependencies
    npm install
    

Run The Service

  • Run the application
    npm run dev
    

Testing

  • Run tests
    npm test
    

Setting up docker and using it

  • Download and install docker

    https://www.docker.com/products/docker-desktop/
    
  • Download Subsystem for Linux for none linux users

  • Set environment varibles like database host to postgresdb

  • Building the image, you must navigate to the project directory in the terminal, then run

    docker-compose up --build
    
  • Stoping docker-compose container, run

    docker-compose down
    

Authors