Reputation: 25062
Here is my Gruntfile.js
.
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
dirs: {
js: ['app/js/**/*.js', '!app/js/libs/**/*.js'],
jshint: ['Gruntfile.js','app/js/**/*.js','!app/js/libs/**/*.js'],
html: ['app/index.html'],
css: ['app/styles/**/*.css'],
less: ['app/styles/**/*.less'],
tests: ['test/**/*.js']
},
hbs: {
templateExtension : 'hbs'
},
connect:{
development: {
port: 9000,
base: 'app',
keepalive: true,
livereload: true
}
}
});
grunt.registerTask('server', ['less', 'connect', 'watch', 'open:dev']);
};
When I start the server, it runs on port 8000. From how I understand it I am specifying the port in the connect:developement:port
property. What would make it run on port 8000?
Upvotes: 1
Views: 4022
Reputation: 5767
try changing the connect postfix to development:
grunt.registerTask('server', ['less', 'connect:development', 'watch', 'open:dev']);
you might need to specify the options too:
connect: {
development: {
options: {
port: 9000,
base: 'app',
keepalive: true,
livereload: true
}
}
}
Upvotes: 3