KevaChat App for NPS Protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghost 907fb62a7d update readme 7 months ago
config add empty message validation 7 months ago
src add empty message validation 7 months ago
.gitignore add multi-host config support 7 months ago
LICENSE Initial commit 7 months ago
README.md update readme 7 months ago
composer.json replace nps-php with async cboden/ratchet socket server 7 months ago

README.md

npsapp

KevaChat Server for NPS Protocol

Listen connections on 1915 port and save messages to given namespace in KevaCoin blockchain

To read messages, use KevaChat webapp, geminiapp or any KevaCoin explorer!

Components

Install

  • git clone https://github.com/kevachat/npsapp.git
  • cd npsapp
  • composer update

Setup

  • cd npsapp
  • cp config/example.json config/name.json - edit connection and provide room namespace

Launch

  • php src/app.php name.json - where name.json argument is any config, placed at config folder

Autostart

Launch server as the systemd service

You can create as many servers as wanted by providing separated config for each instance!

Following example require npsapp installed into the home directory of npsapp user (useradd -m npsapp)

  1. sudo nano /etc/systemd/system/npsapp.service - create new service:
[Unit]
After=network.target

[Service]
Type=simple
User=npsapp
Group=npsapp
ExecStart=/usr/bin/php /home/npsapp/npsapp/src/app.php name.json
StandardOutput=file:/home/npsapp/debug.log
StandardError=file:/home/npsapp/error.log
Restart=on-failure

[Install]
WantedBy=multi-user.target
  1. sudo systemctl daemon-reload - reload systemd configuration
  2. sudo systemctl enable npsapp - enable npsapp service on system startup
  3. sudo systemctl start npsapp - start npsapp server