Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/pavel-tyan/publication-api

Backend for posting publication and commenting them
https://github.com/pavel-tyan/publication-api

bcryptjs jwt layered-architecture mongo nestjs rest-api

Last synced: 15 days ago
JSON representation

Backend for posting publication and commenting them

Awesome Lists containing this project

README

        


Nest Logo

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

A progressive Node.js framework for building efficient and scalable server-side applications.



NPM Version
Package License
NPM Downloads
CircleCI
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective

Support us


## Run with Docker

```bash
$ docker build -t post-api .

$ docker-compose up -d
```

## Run without Docker

To run app itself without docker, you need to change field MONGO_HOST from 'mongo' to 127.0.0.1 in .env file and run only database container in docker-compose file. You also need this, if you want run tests.

if you want to run both through docker, change MONGO_HOST to 'mongo'

```bash
# install dependencies
$ npm install

# run app
$ npm run start
```

## Test

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Swagger

Open http://localhost:3000/docs