Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple run, just node app.js, don't using pm2 #1

Open
wants to merge 5 commits into
base: pool
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DE_ENV=production
RPC_HOST=localhost
RPC_PORT=9545
API_HOST=localhost
API_PORT=8080
API_URL=/api/stats
LISTENING_PORT=50505
INSTANCE_NAME=<your name>
CONTACT_DETAILS=<contac detail>
WS_SERVER=wss://escstats.gonsmine.com
WS_SECRET=EtherSocial
VERBOSITY=2

61 changes: 0 additions & 61 deletions Dockerfile

This file was deleted.

74 changes: 27 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,47 @@
Ethereum Network Intelligence API
ESN Network Intelligence API
============
[![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url]

This is the backend service which runs along with ethereum and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to [eth-netstats](https://github.com/cubedro/eth-netstats) to feed information. For full install instructions please read the [wiki](https://github.com/ethereum/wiki/wiki/Network-Status).
## forked from https://github.com/OpenCommunityCoin/eth-netstats-client-api

This is the backend service which runs along with ethereum and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to [eth-netstats](https://github.com/turbobit/eth-netstats) to feed information. For full install instructions please read the [wiki](https://github.com/ethereum/wiki/wiki/Network-Status).

## Prerequisite
* eth, geth or pyethapp
* node
* npm


## Installation on an Ubuntu EC2 Instance
Live Work : https://escstats.gonsmine.com

Fetch and run the build shell. This will install everything you need: latest ethereum - CLI from develop branch (you can choose between eth or geth), node.js, npm & pm2.

```bash
bash <(curl https://raw.githubusercontent.com/cubedro/eth-net-intelligence-api/master/bin/build.sh)
```
## Installation as docker container (optional)
## Prerequisite
* ESN node ( https://github.com/ethersocial/go-esn )
* npm

There is a `Dockerfile` in the root directory of the repository. Please read through the header of said file for
instructions on how to build/run/setup. Configuration instructions below still apply.

## Configuration

Configure the app modifying [processes.json](/eth-net-intelligence-api/blob/master/processes.json). Note that you have to modify the backup processes.json file located in `./bin/processes.json` (to allow you to set your env vars without being rewritten when updating).
edit .env file

```json
"env":
{
"NODE_ENV" : "production", // tell the client we're in production environment
"RPC_HOST" : "localhost", // eth JSON-RPC host
"RPC_PORT" : "8545", // eth JSON-RPC port
"LISTENING_PORT" : "30303", // eth listening port (only used for display)
"INSTANCE_NAME" : "", // whatever you wish to name your node
"CONTACT_DETAILS" : "", // add your contact details here if you wish (email/skype)
"WS_SERVER" : "wss://rpc.ethstats.net", // path to eth-netstats WebSockets api server
"WS_SECRET" : "see http://forum.ethereum.org/discussion/2112/how-to-add-yourself-to-the-stats-dashboard-its-not-automatic", // WebSockets api server secret used for login
"VERBOSITY" : 2 // Set the verbosity (0 = silent, 1 = error, warn, 2 = error, warn, info, success, 3 = all logs)
}
```

## Run

Run it using pm2:

```bash
cd ~/bin
pm2 start processes.json
DE_ENV=production
RPC_HOST=localhost
RPC_PORT=9545
API_HOST=localhost
API_PORT=8080
API_URL=/api/stats
LISTENING_PORT=50505
INSTANCE_NAME=<your name>
CONTACT_DETAILS=<contac detail>
WS_SERVER=wss://escstats.gonsmine.com
WS_SECRET=EtherSocial
VERBOSITY=2
```

## Updating
## Run

To update the API client use the following command:
Run it using node:

```bash
~/bin/www/bin/update.sh
node app.js
```

It will stop the current netstats client processes, automatically detect your ethereum implementation and version, update it to the latest develop build, update netstats client and reload the processes.

[travis-image]: https://travis-ci.org/cubedro/eth-net-intelligence-api.svg
[travis-url]: https://travis-ci.org/cubedro/eth-net-intelligence-api
[dep-image]: https://david-dm.org/cubedro/eth-net-intelligence-api.svg
[dep-url]: https://david-dm.org/cubedro/eth-net-intelligence-api
[travis-image]: https://travis-ci.org/turbobit/eth-net-intelligence-api.svg
[travis-url]: https://travis-ci.org/turbobit/eth-net-intelligence-api
[dep-image]: https://david-dm.org/turbobit/eth-net-intelligence-api.svg
[dep-url]: https://david-dm.org/turbobit/eth-net-intelligence-api
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

require('dotenv').load();
var nodeModel = require('./lib/node');

var node = new nodeModel();
Expand Down
24 changes: 0 additions & 24 deletions app.json

This file was deleted.

24 changes: 0 additions & 24 deletions app.json.example

This file was deleted.

83 changes: 0 additions & 83 deletions bin/update.sh

This file was deleted.

Loading