1.0.7 • Published 5 years ago

@nearform/commentami-demo-server v1.0.7

Weekly downloads
19
License
Apache-2.0
Repository
github
Last release
5 years ago

@nearform/commentami-demo-server

@nearform/commentami-demo-server is a ready to use Hapi server with the @nearform/commentami-backend-hapi-plugin registered and websockets enabled.

Install

To install via npm:

npm install @nearform/commentami-demo-server

Configuration

You can use the following env variables to configure the server:

## server specific variables
NF_COMMENTS_SERVER_HOST
NF_COMMENTS_SERVER_PORT

# websocket specific variables
NF_COMMENTS_SERVER_MULTINES_TYPE
NF_COMMENTS_SERVER_MULTINES_HOST
NF_COMMENTS_SERVER_MULTINES_PORT

By default the configuration of the server is for running locally.

You can also change the databse connection parameters through @nearform/commentami-backend-core env variables. See @nearform/commentami-backend-core documentation for more info

Authentication

A basic auth has been enabled on the server routes. You can find here all the username/password pair available.

Dependency

To run the server you will need a postgres server (store comments) and a redis server (pub/sub system for notifications via websocket).

Usage

npx run commentami-demo-server

This will start a server on localhost:8080.

Run tests

You will need a postgres server up and running.

To create the db needed for the tests you can use the following command

npm run pg:test:init

and the run

npm test

To run a single test you can use the following command

npx lab <test/to/run.js> // (ie: npx lab test/index.test.js)

License

Copyright nearForm Ltd 2018. Licensed under Apache 2.0 license.

1.0.7

5 years ago

1.0.7-alpha

5 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago