Skip to content

A backend API that allows system admins to manage employees and also allow employees to update their profile

Notifications You must be signed in to change notification settings

adesege/employee-api

Repository files navigation

Coverage Status Github workflow Maintainability Test Coverage

Employee API

A backend API that allow system admins to manage employees and also allow employees update their profile

Installation

With Docker (Recommended)

Before you begin, ensure you have docker and docker-compose installed on your machine

# Clone this repository
$ git clone https://github.com/adesege/employee-api.git

# CD into the cloned repository
$ cd employee-api

# Copy and rename .env-sample and fill the environment varialbes accordingly 
$ cp .env-sample .env

# Build and run docker containers. The container will install all dependencies and build the application
$ docker-compose up --build

API will be accessible via http://localhost:3500/api

Without Docker

Begin you begin, ensure you have yarn, nodejs >= 12, redis and mongodb installed on your machine.

# Clone this repository
$ git clone https://github.com/adesege/employee-api.git

# CD into the cloned repository
$ cd employee-api

# Install dependencies
$ yarn install # or npm install

# Copy and rename .env-sample and fill the environment varialbes accordingly 
$ cp .env-sample .env

# Build application
$ yarn build

# production
$ yarn start:prod # or

# development
$ yarn run start

# watch mode
$ yarn run start:dev

API will be accessible via http://localhost:3500/api

To test super admin endpoints locally, manually create a user then assign system_admin role to it.

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# unit test coverage
$ npm run test:cov

# e2e test coverage
$ npm run test:e2e --coverage

License

MIT licensed.

About

A backend API that allows system admins to manage employees and also allow employees to update their profile

Resources

Stars

Watchers

Forks

Languages