module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
server: {
port: 8888,
base: '.'
}
});
};
C:\Program Files\nodejs\test\grunt>
C:\Program Files\nodejs\test\grunt>grunt server
Running "server" task
Starting static web server on port 8888.
Done, without errors.
but can't connected by input [http://127.0.0.1:8888][1] in browsers ! jiong~
How about to fix this problem in windows or unix ?
In grunt 0.4 combined with grunt-contrib-connect you can run a long running server by using the keepalive
argument: grunt connect:target:keepalive
or define it as an option in your config:
grunt.initConfig({
connect: {
target:{
options: {
port: 9001,
keepalive: true
}
}
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With