Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.04 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.04 KB

Graphql API

Description

Graphql API from plezanje.net website written in NestJS.

Pre reqisites

Node.js and Docker Desktop.

Installation

# Install packages
$ npm install
# Install nest CLI (recommended)
$ npm install -g @nestjs/cli
# Start up docker container for PostgreSQL
$ docker-compose up -d
# Use the precreated database dump from the server
$ mkdir db
$ curl https://plezanje.net/storage/db.sql --output ./db/db.sql
$ docker exec -it api-postgres-1 bash -c  "psql -U plezanjenet -f /etc/db/db.sql"

Copy the .env.example file to .env and set configuration parameters.

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

This project is tested with BrowserStack.