Skip to content

plezanje-net/api

Repository files navigation

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.

Releases

No releases published

Packages

No packages published