Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/usualoma/node-livereload-hub
Yet another implementation of the LiveReload server in Node.js.
https://github.com/usualoma/node-livereload-hub
Last synced: 25 days ago
JSON representation
Yet another implementation of the LiveReload server in Node.js.
- Host: GitHub
- URL: https://github.com/usualoma/node-livereload-hub
- Owner: usualoma
- License: mit
- Created: 2012-02-01T00:20:08.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-02-08T09:26:28.000Z (almost 13 years ago)
- Last Synced: 2024-05-17T16:48:52.864Z (6 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 146 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-livereload-hub
Yet another implementation of the [LiveReload](https://github.com/mockko/livereload) server in Node.js.
This server makes browsers reload via the HTTP request.
![LiveReloadHub](https://github.com/usualoma/node-livereload-hub/raw/master/artwork/livereload-hub.png)
## Quick start
Install:
$ npm install livereload-hub
Run the server:
$ livereload-hub
Connect to the server:
Install and enable LiveReload plugin on your browser
Send request for reloading:
$ curl your-livereload-hub.example.com:35729
## Command line options
### Listen port
-p, --port### LiveReload API version
-a, --api-version### Log level
--log-level fatal|error|warn|info|debug### Log file
--log-file### Disable host header matching
Use this option when you don't use name based virtual host.--disable-host-header-matching
## Name based virtual host
This server compare the host header, and reload only if the server received same header.## Customize
You can customize this server by using "livereload-hub" as a library.# simple server
livereload_hub = require('livereload-hub')
server = livereload_hub.createServer()
server.setOptions(
http_callback: (request, response) ->
message = JSON.stringify [ "refresh",
path: request.url
]
for key, c of @clients
c.connection.sendUTF messageresponse.writeHead 200
response.write 'OK'
response.end()
)
server.listen 35729
## License
This software is distributed under the MIT license.
## See also
#### node-livereload
An implementation of the LiveReload server in Node.js.
[josh/node-livereload](https://github.com/josh/node-livereload)