Skip to content

media3-0/apki-api

Repository files navigation

apki.org GraphQL API

Installation

Clone repository

git clone https://github.com/media3-0/apki-api.git
cd apki-git

Install dependencies

yarn

or

npm install

Usage

Start server

npm start

Start server with Flow + hot-reloading

npm run dev

API Console GraphiQL: localhost:9778/graphiql

Tests

Run all tests

npm test

Run unit tests

npm run test:unit

Run unit tests coverage

npm run test:cover

After executing this command the base table with test coverage will be printed in console, but HTML report version which shows coverage for each tested file can be find in ./coverage/lcov-report/index.html

Contract tests

Run contract tests:

npm run test:contract

Update contract tests:

npm run test:contract:update

Development

To initialize the database with sample data run (of course MongoDB must be running):

mongo [database] < scripts/mongo.js

where [database] is the name of database, eg.

mongo apki < scripts/mongo.js

ACHTUNG! ACHTUNG! Existing data will be lost

Configuration via environment variables

Name Default Value Description
APKI_APP_PORT 9778 Port under which application will be available.
APKI_MONGODB_DB_NAME 'apki' Mongo database name which will be used to persist all data manipulated by apki-org micro-service.
APKI_MONGODB_HOST 127.0.0.1 Mongo server host
APKI_MONGODB_PORT 27017 Mongo server port
APKI_MONGODB_USER '' Mongo username for authentication, if not specified than no authentication will be used.
APKI_MONGODB_PASSWORD '' Mongo password for authentication, if not specified than no authentication will be used.
APKI_MONGODB_POOL_SIZE 5 Number of connections in the connection pool for each server instance

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published