Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
Last active August 29, 2015 13:57
Show Gist options
  • Save kristoferjoseph/9907698 to your computer and use it in GitHub Desktop.
Save kristoferjoseph/9907698 to your computer and use it in GitHub Desktop.
Simplest livereload development server I could make
var express = require('express'),
instant = require('instant'),
colors = require('colors'),
app = express();
app.use(instant(__dirname));
app.listen(3000,
console.log('Navigate to ' + 'http://localhost:3000'.green + ' to view your page')
);
/* SCRIPTS SECTION */
"scripts": {
"test": "test",
"start": "npm run server",
"js": "browserify ./js/main.js -t partialify -o bundle.js",
"css": "rework-npm ./css/entry.css | myth > bundle.css",
"server": "node ./index.js",
"watch-css": "watch-run -p 'css/**.css' npm run css",
"watch-js": "watch-run -p 'js/**.js' npm run js",
"watch": "npm run watch-css & npm run watch-js & npm run server"
}
/* CONT... */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment