Created
July 28, 2014 11:14
-
-
Save trkoch/362f9b5816fa14afb5d4 to your computer and use it in GitHub Desktop.
Simple Gruntfile using grunt-contrib-connect (run 'grunt serve')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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