Skip to content

Instantly share code, notes, and snippets.

@juristr
Last active December 23, 2015 07:18
Show Gist options
  • Save juristr/6599473 to your computer and use it in GitHub Desktop.
Save juristr/6599473 to your computer and use it in GitHub Desktop.
Grunt development server

Simple setup to have a dev server in the desired directory. Simply download the two files to your directory and execute

$ npm install
$ grunt server
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.initConfig({
connect: {
server: {
options: {
port: 8000,
base: '.',
keepalive: true
}
}
}
});
grunt.registerTask("serve", "connect:server");
};
{
"name": "Test",
"description": "Grunt development server",
"version": "0.0.0",
"devDependencies": {
"grunt": "0.4.0",
"http-server": "0.5.1",
"grunt-contrib-connect": "0.1.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment