Giter Club home page Giter Club logo

nodegod's Introduction

Node God

Node God manages node applications

Nodegod Screen Shot

© Harald Rudell wrote Node God for node in May, 2012. MIT License

Benefits

  1. Monitor a handful of apps on a handful of servers as you work on them
  2. Immediate feedback: the large top window area goes red if any app is in crash state or the connection is lost
  3. Focus on your current app by scrolling it into view

Features

  1. Launch and lifecycle management of any number of apps
  2. Browser interface supporting remote machines over ssh tunnel
  3. Websocket communication for real-time updates
  4. Command queue and application state and transitions for run/stop/debug.
  5. Restarts apps automatically until crash within 3 seconds.
  6. If app state is crashed, file watchers are still active so that a relaunch attempt is made on file update.
  7. File watchers restart the app after a 1 second idle time, so that all file writes have time to complete.
  8. Ability to reload app configurations as apps are added.
  9. If Node God crashes, it will relaunch managed apps on restart so that they again become managed.
  10. USRSIG2 signal for graceful shutdown, implemented by App Runner
  11. Aggregation of stdout from many apps to a common log.
  12. Fetch of port and url from the app so direct link can be displayed in the ui.

Node God is robustly written as four detached processes carefully designed to stay running indefinitely. These processes stay running until you power of your computer.

Run as demo

```js nodegod$ node app

=== 2012-06-23 13:24:21 Node God starting info - socket.io started process /home/foxyboy/Desktop/c505/node/nodegod/apps.json Application Node God on node v0.6.14 available on port 1111 in development mode 127.0.0.1


<p>Node God opens a browser window that monitors an app that exits every 10 seconds.</p>


<h1>Configuration Files</h1>


<h2>nodegod.json</h2>
<p>Node God itself is configured using a json file that provides port number, a session secret and the location of other json files containing application configurations. The paths searched for nodegod.json are:</p>
<ul>
<li>$HOME/apps</li>
<li>$HOME</li>
<li>Node God's launch folder, where app.js is located</li>
</ul>
```js
{
	"appFiles": "/home/foxyboy/apps/apps.json",
}
  • PORT: optional number: the port for Node God, defaults to env.PORT or 1111
  • appFiles: optional string or array of strings: filenames to search for app configurations.
    • if strings are not fully qualified paths, the folder where nodegod.json was found or node god's app folder are searched
    • default: apps.json in either the noegod.json folder or nodegod's app folder
  • sessionSecret: optional string, has a default value
  • defaultFolder: a parent folder for deployed apps, default the parent folder of where nodegod's app.js is located

Configuring files for monitored apps

```js { "Node.js #3": { "watchFiles": [ "package.json", "app.js", "lib", "routes", "/home/foxyboy/apps/nodejs3.json" ] } } ```
  • Key: the name of this app
  • id: optional string: the identifier (computer-friendly string) used for this app. default is derived from the app name, for "Node.js #3" here it would be "nodejs3"
  • state: optional string: the initial state of the app: run/stop/debug, default run
  • folder: optional path: the folder where the app is deployed. Default is a sibling folder to nodegod, ie. the parent folder of nodegod with id appended.
  • start: optional string or array of strings: parameters to the node executable, default app.js in the app's folder
  • watchFiles: optional string or array of Strings: filenames and folders to watch. If any file changes the app is restarted
  • launchBrowser: optional string: url for which a browser window is launched once

© Harald Rudell wrote Node God for node in May, 2012. MIT License

nodegod's People

Contributors

haraldrudell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.