Skip to content

The API of a toolkit to author gamified activities to support programming learning. This is part of the Erasmus+ Project entitled Framework for Gamified Programming Education (FGPE).

License

Notifications You must be signed in to change notification settings

konradkur/authorkit-api

 
 

Repository files navigation

FGPE AuthorKit API

License: GPL v3

The API of a toolkit to author gamified activities to support programming learning. This is part of the Erasmus+ Project entitled Framework for Gamified Programming Education (FGPE).

Requirements

  • Node Version Manager n
  • Docker + Docker Compose
  • npm

Installation

$ npm install

Configuration

Copy file .env.example and name it .env.dev

Start Guide

Outside Docker containers

  • Create .env file cp .env.example .env and fill-in existing env variables
  • Install dependencies npm install
  • Start the app npm run start

Inside Docker containers

Just run already prepared bash script:

$ ./build

It will setup the project for you (building the Docker images, starting docker-compose stack). The NestJS app running in dev mode will be exposed on http://localhost (port 80)

For IDE autocompletion to work, run yarn on the host machine.

Working w/ the app

# Bring up the docker with api, database, ...
$ docker-compose up -d

# development
$ npm run start

# build
$ npm run build

# production mode
$ npm run prod

# fix lint errors
$ npm run lint:fix

Docker build

Build image

To build a docker image, execute:

$ ./build.sh

Test

# unit tests
$ docker exec -it nest npm run test

# e2e tests
$ docker exec -it nest npm run test:e2e

# test coverage
$ docker exec -it nest npm run test:cov

Environment Configuration

.env.example contains the configuration keys that must be set in .env.dev for development and/or .env.prod for production.

When using the build script, one of these is automatically cloned to .env. If you don't use the build script, please m

Swagger

To see all available endpoints visit http://localhost/docs

TypeORM integrated

TypeORM gives the possibility to use next db types: mysql, postgres, mariadb, sqlite, mongodb etc. Please look at docs for more details.

We are using postgres.

About

The API of a toolkit to author gamified activities to support programming learning. This is part of the Erasmus+ Project entitled Framework for Gamified Programming Education (FGPE).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.1%
  • HTML 3.1%
  • JavaScript 1.2%
  • Shell 0.3%
  • CSS 0.2%
  • Dockerfile 0.1%