Sign inSign up

robertczinege/freebie-api-server

By robertczinege

•Updated over 8 years ago

This is a freebie API server for aiding front-end development and learning.

Image
0

505

robertczinege/freebie-api-server repository overview

This is a free API server image using node and Koa2.

API documentation: DOCUMENTATION⁠

Latest is the stable build Develop is for testing the new features

The service requires a PostgreSql 10 database to run with, you can use the official image. On startup, the server does all the necessary migration and seeding.

_Or you can use this docker-compose file to start with the pre-configured way with Postgre: docker-compose.yml⁠

Environment variables

DB_HOST This is the connected database address.

DB_PORT Which port the database is available on. 5432 is the default Postgre port.

DB_USER The name of the user which can connect to the database. By default, it is root

DB_PASSWORD The password for the DB_USER. By default, it is root

DB_DATABASE The name of the database to join.

PORT This is the port the service will be available on.

LOGGER_LEVEL The service uses Winston to log to the console. By default, it is silly, that logs out every level of logs.

TOKEN_SECRET The service uses JWT for authentication. After successful login, the server sends back a token amongst other user credentials. For more information, please refer to the API documentation⁠. This secret is used for signing and decoding a token.

TOKEN_EXPIRATION This is the expiration time of the token. By default, it is 1 hour. For more reference on the usable formats please refer to the jsonwebtoken npm page⁠.

Tag summary

Content type

Image

Digest

Size

197.1 MB

Last updated

over 8 years ago

docker pull robertczinege/freebie-api-server