realizehit-server-api

1.0.4 • Public • Published

realizehit-server-api Build Status

realizehit API server

Probably you might want to use realizehit/realizehit instead.

Usage

Run as NPM module

npm i -g realizehit-server-api
var ApiServer = require( 'realizehit-server-api' )
 
var server = new ApiServer({
    httpPort: '8080'
})

Run with Docker

docker run -d --name=redis redis
docker run -d \
    --name=realizehit-server-api \
    -p 8080:8080 \
    -e REDIS_URI="redis://redis:6379" \
    --link redis:redis \
    realizehit/server-api

Environment Variables

So here is a list of appliable variables:

REDIS_URI

Defaults to redis://localhost:6379

You should always specify a way to this communicate with redis.

SERVER_HOST

Defaults to 0.0.0.0

SERVER_API_PORT

Defaults to 8080

SERVER_API_PREFIX

Defaults to /

ENDPOINT_API

Defaults to http://{{SERVER_HOST}}:{{SERVER_API_PORT}}

Here you should define the URI of the public accessible endpoint.

Contributing

Running with node

npm install
npm start

Running with docker

docker build -t realizehit/server-api:dev .
docker run -d -p 8080:8080 realizehit/server-api:dev

Package Sidebar

Install

npm i realizehit-server-api

Weekly Downloads

1

Version

1.0.4

License

GPL-3.0

Last publish

Collaborators

  • cuss