Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realizehit/server-api
realizehit api server
https://github.com/realizehit/server-api
Last synced: 16 days ago
JSON representation
realizehit api server
- Host: GitHub
- URL: https://github.com/realizehit/server-api
- Owner: realizehit
- License: gpl-3.0
- Created: 2015-05-20T12:07:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-29T19:04:30.000Z (almost 9 years ago)
- Last Synced: 2024-11-18T23:56:05.374Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# realizehit-server-api [![Build Status](https://travis-ci.org/realizehit/server-api.svg?branch=master)](https://travis-ci.org/realizehit/server-api)
realizehit API server
Probably you might want to use [realizehit/realizehit](https://github.com/realizehit/realizehit) instead.
## Usage
#### Run as NPM module
```bash
npm i -g realizehit-server-api
``````javascript
var ApiServer = require( 'realizehit-server-api' )var server = new ApiServer({
httpPort: '8080'
})
```#### Run with Docker
```bash
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
```bash
npm install
npm start
```### Running with docker
```bash
docker build -t realizehit/server-api:dev .
docker run -d -p 8080:8080 realizehit/server-api:dev
```