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

https://github.com/ahzia/mlh-codebuddy-backend


https://github.com/ahzia/mlh-codebuddy-backend

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# MLH Hackthon Codebuddy Backend

## Features

## Requirements

- [Node v7.6+](https://nodejs.org/en/download/current/) or [Docker](https://www.docker.com/)
- [Yarn](https://yarnpkg.com/en/docs/install)

## Getting Started

#### Clone the repo:

#### Install dependencies:

```bash
yarn
```

#### Set environment variables:

```bash
cp .env.example .env
```

## 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

# run container in production
yarn docker:prod

# run tests
yarn docker:test
```

## 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
```

## License

[MIT License](README.md)

## acknowledgment

We use this repo as a staterkit for our project:

[Express REST bilerplate - Daniel Sousa(MIT)](https://github.com/danielfsousa/express-rest-boilerplate)
[Daniel Sousa](https://github.com/danielfsousa)