https://github.com/ruyadorno/tlr
Quick spawn a tiny-lr server
https://github.com/ruyadorno/tlr
cli command-line javascript js livereload nodejs nodemon tiny-lr
Last synced: about 1 month ago
JSON representation
Quick spawn a tiny-lr server
- Host: GitHub
- URL: https://github.com/ruyadorno/tlr
- Owner: ruyadorno
- License: mit
- Created: 2017-01-26T21:56:25.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T19:38:14.000Z (about 8 years ago)
- Last Synced: 2025-02-28T10:03:48.093Z (about 2 months ago)
- Topics: cli, command-line, javascript, js, livereload, nodejs, nodemon, tiny-lr
- Language: JavaScript
- Size: 8.79 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tlr [](https://npmjs.org/package/tlr) [](https://travis-ci.org/ruyadorno/tlr)
What is quickier than using tiny-lr? Using **tlr** of course.
## About
Small cli util that spawns a simple [tiny-lr](https://github.com/mklabs/tiny-lr) server.
> Batteries **NOT** included
### Integration
The spawned server will listen to all regular `tiny-lr` endpoints.
_e.g._ If you're using [nodemon](https://github.com/remy/nodemon) you should be able to hook an event into your `nodemon.json` config file:
```json
{
"events": {
"restart": "curl http://localhost:35729/changed?files=foo"
}
}```
Please refer to [tiny-lr](https://github.com/mklabs/tiny-lr) docs for more info on available endpoints.
## Install
```sh
npm install tlr
```## Usage
```sh
tlr
```Using a custom port:
```sh
export LR_PORT=9999
tlr
```## Workflow ideas
- Use it along with [nodemon](https://github.com/remy/nodemon)
- and [npm-run-all](https://github.com/mysticatea/npm-run-all)/[concurrently](https://github.com/kimmobrunfeldt/concurrently)
- to provide a single [npm task](https://github.com/ruyadorno/ntl)
- that can be used as entry point
- Add a `` to your html template
- Livereload FTW!## License
MIT © [Ruy Adorno](http://ruyadorno.com)