An open API service indexing awesome lists of open source software.

https://github.com/laymer/glo-ci-server


https://github.com/laymer/glo-ci-server

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# Glo CI Server

This is the backend for [Glo CI](https://github.com/kingjan1999/glo-ci). It is based on the great [express-rest-es2017-boilerplate](https://github.com/danielfsousa/express-rest-es2017-boilerplate), which is the reason why this project is sometimes called `boilerplate-api` (I was too lazy to replace it...)

## Running Locally

```bash
yarn dev
```

## Running in Production

```bash
yarn start
```

## Lint

```bash
# lint code with ESLint
yarn lint

# try to fix ESLint errors
yarn lint:fix

# lint and watch for changes
yarn lint:watch
```

## Test

```bash
# run all tests with Mocha
yarn test

# run unit tests
yarn test:unit

# run integration tests
yarn test:integration

# run all tests and watch for changes
yarn test:watch

# open nyc test coverage reports
yarn coverage
```

## Validate

```bash
# run lint and tests
yarn validate
```

## Logs

```bash
# show logs in production
pm2 logs
```

## Documentation

```bash
# generate and open api documentation
yarn docs
```

## Docker

```bash
# run container locally
yarn docker:dev
or
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

# run container in production
yarn docker:prod
or
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up

# run tests
yarn docker:test
or
docker-compose -f docker-compose.yml -f docker-compose.test.yml up
```

## Deploy

Set your server ip:

```bash
DEPLOY_SERVER=127.0.0.1
```

Replace my Docker username with yours:

```bash
nano deploy.sh
```

Run deploy script:

```bash
yarn deploy
or
sh ./deploy.sh
```

## License

[MIT License](README.md) - [Jan Beckmann](https://github.com/kingjan1999)