<commit_before>var responsify = require('response-stream')
var through = require('through2')
var inject = require('./inject-script-tag')

module.exports = function(resp, opt) {
    opt = opt||{}
    var host = (opt.host || 'localhost').split(':')[0]
    var port = opt.port || 35729
    var injector = inject({
        src: 'http://'+host+':'+port+'/livereload.js?snipver=1'
    })

    var stream = responsify(through())
    injector.pipe(resp)
<commit_msg>Add the ability to pass a protocol in, so you can serve over https<commit_after>var responsify = require('response-stream')
var through = require('through2')
var inject = require('./inject-script-tag')

module.exports = function(resp, opt) {
    opt = opt||{}
    var protocol = opt.protocol || "http"
    var host = (opt.host || 'localhost').split(':')[0]
    var port = opt.port || 35729
    var injector = inject({
        src: protocol + '://'+host+':'+port+'/livereload.js?snipver=1'
    })

    var stream = responsify(through())
    injector.pipe(resp)

{'fraction_non_alphanumeric': 0.17681728880157171, 'fraction_numerical': 0.015717092337917484, 'mean_word_length': 3.65296803652968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7257818', 'n_tokens_mistral': 334, 'n_tokens_neox': 321, 'n_words': 80}