Skip to content

sheremet/nchan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nchan.io

Nchan Publish/Subscribe server (Pub/Sub). Original documentation for server on: https://nchan.io/

Note: All paths related to root of this repository

Build

Build Locally:

cd local
./build.sh

Build on virtual machine(VM):

cd vm
./build.sh

Build for Rancher:

cd rancher
./build.sh

Push to Docker registry

Login to Docker registry:

docker login -u "USERNAME" -p "PASSWORD or TOKEN"

Push to Docker registry:

docker push FULL_NAME_OF_THE_IMAGE

Run

Locally:

Go to local dir

cd local

Run:

docker-compose up

Stop:

Ctrl+C

Remove:

docker-compose down

Rancher

Run Redis Cluster:

cd rancher/redis-cluster
docker-compose up

Run Nchan:

cd rancher
docker-compose up

Available env variables:

REDIS_CLUSTER_PASSWORD=RedisClusterPassword
API_ACCOUNTS_URL=api-accounts
NCHAN_KEEPALIVE_TIMEOUT=
NCHAN_SUB_USER_MESSAGE_BUFFER_LENGTH=
NCHAN_SUB_SHARED_MESSAGE_BUFFER_LENGTH=
NCHAN_SUB_USER_UNSUBSCRIBE_REQUEST_COMMENT=#
NCHAN_SUB_SHARED_UNSUBSCRIBE_REQUEST_COMMENT=#

Demo client:

Install globally:

npm i -g http-server
cd html
http-server -p 9000

Go to: http://127.0.0.1:9000