Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gsf/deva
dev script
https://github.com/gsf/deva
Last synced: 19 days ago
JSON representation
dev script
- Host: GitHub
- URL: https://github.com/gsf/deva
- Owner: gsf
- Created: 2013-12-27T16:41:39.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-22T16:01:07.000Z (about 10 years ago)
- Last Synced: 2024-10-27T21:29:44.096Z (2 months ago)
- Language: JavaScript
- Size: 523 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# deva
## about
deva does the following:1. starts server.js
2. restarts server.js on file changesJust run it in the directory where your server.js can be found.
To get the automatic reload working, do two things:
1. Include `if (process.send) process.send('online')` in the callback for your server's listen method.
2. Include the following somewhere on the client side (or simply `require('deva')` with browserify):```js
(new EventSource('/_reload')).onmessage = function (e) {
window.location.reload(true);
};
```## install
npm install -g deva## 1028
The default port for deva, 1028, can be overridden with a port variable in the
global section of the config file or with a PORT environment variable. 1028 was
chosen to match the number of hymns in the Rig Veda. Apologies if that port is
already used by Windows DCOM on your system.