Skip to content

Instantly share code, notes, and snippets.

@josephj
Last active July 4, 2016 02:28
Show Gist options
  • Save josephj/468575d6884aeada6b07 to your computer and use it in GitHub Desktop.
Save josephj/468575d6884aeada6b07 to your computer and use it in GitHub Desktop.
Inject livereload.js from server setting. Also use https://github.com/jaytaph/htrouter
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|</body>|<script src=\"//localhost:35729/livereload.js\"></script>\n</body>|i"
location / {
subs_filter_types text/html;
subs_filter <\/body> <script src=\"\/\/localhost:35729/livereload.js\"></script></body>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment