Skip to content

Instantly share code, notes, and snippets.

@trkoch
Created July 28, 2014 11:14
Show Gist options
  • Save trkoch/362f9b5816fa14afb5d4 to your computer and use it in GitHub Desktop.
Save trkoch/362f9b5816fa14afb5d4 to your computer and use it in GitHub Desktop.
Simple Gruntfile using grunt-contrib-connect (run 'grunt serve')
/* global module */
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
options: {
port: 8000,
hostname: 'localhost'
},
server: {
options: {
middleware: function(connect) {
return [
connect().use(
'/bower_components',
connect.static('./bower_components')
),
connect.static('./app')
];
}
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('serve', ['connect:server:keepalive']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment