Skip to content

andela/bp-esa-backend

Repository files navigation

Engagement Support Automation Backend

CircleCI Maintainability Test Coverage


A service for an automated system to help Andela perform on-boarding and off-boarding processes for fellows joining or leaving engagements.


Technologies Used

  • Node.js
  • Express
  • PostgreSQL DB

Prerequisites

The following should be installed in your machine

  • Node v10.8.0
  • PostgreSQL v9+

How To Install And Run The Application

  • Clone this Repo and cd into it
  • Install all the dependancies by running the npm install command (or yarn install if you prefer)
  • Create a .env file and use .env.example as a guide on the environment variables required
  • Run npm run migrations to setup the database tables.
  • Start the application by running the npm start command(npm start:dev for 'watch' mode. You can also use yarn if you prefer)

How To Test The Application

  • To run tests use the npm test command.

Docker Development Setup

Prerequisite

  • Install docker
  • stop the local instances of postgres and redis. In macos, this is achieved by:
    • brew services stop redis
    • brew services stop postgres

Setup

On the terminal run the following commands:

  1. Change to the application root directory

  2. Uncomment this line for local development. Change the following Environment Variable:

    REDIS_HOST=redis

  3. Build a docker image with the following command docker build -t esa-backend .

  4. Use docker compose to install services required by the application i.e postgres and redis

  5. Then run docker-compose up

  • To access the database and view records
    • open http://localhost:8080 in your browser and login using the following credentials
      • System as postgreSQL,
      • Server as database,
      • Username as postgres,
      • Password as postgres
      • database as esa_dev

API Documentation

  • API documentation is a concise reference manual containing all the information required to work with the API, with details about the functions, classes, return types, arguments and more, supported by tutorials and examples. We take API Documentation Seriously.

How to Access the API Documentation

Run in Postman

The documentation can be viewed on this link.

How To Contribute

Issues

Issues are always very welcome. Please be sure to follow the issue template.

Pull requests

We're glad to get pull request if anything is missing or something is buggy. However, there are a couple of things you can do to make life easier for the maintainers:

  • Explain the issue that your PR is solving - or link to an existing issue
  • Follow the repository structure, and new sections in the corresponding folders

Git Conventions Make sure you adhere to our convention for your commits and PR.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 28

Languages