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

Informative: Running insight as a service with forever #530

Closed
MarkPfennig opened this issue Jul 29, 2014 · 3 comments
Closed

Informative: Running insight as a service with forever #530

MarkPfennig opened this issue Jul 29, 2014 · 3 comments

Comments

@MarkPfennig
Copy link

A requirement of running a block explorer such insight, is to have it running permanently.

A clean solution to doing this, is to use forever an npm module. First, install forever.

npm install -g forever

Now you can launch insight forever by using the following command

cd insight
BITCOIND_USER="bitcoinrpc" BITCOIND_PASS="pass" INSIGHT_NETWORK='livenet' INSIGHT_PUBLIC_PATH="public" forever start node_modules/insight-bitcore-api/insight.js

This will also restart insight if it crashes.

A full list of running forever processes can be found by calling

forever list

To stop a process

forever stop 0

To restart

forever restart 0

Check the forever github for a full list of commands and options

@cmgustavo
Copy link
Member

Thanks for the information! Also we usually use "supervisor" if we are developing : npm -g supervisor
On the live demo of insight we are using pm2 (https://github.com/Unitech/pm2), that is similar to forever.

@MarkPfennig
Copy link
Author

Thank you for the information also, I am modifying the insight ui for bitmark today, and will follow your approach :)

@braydonf
Copy link
Contributor

There is now also this guide available: https://bitcore.io/guides/upstart-daemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants