grunt-express
grunt-express copied to clipboard
Is it possible to use grunt-connect-proxy with grunt-express?
I have separate backend server to provide API. I wanted to use it by setting proxy on grunt server.
My configuration is like:
grunt.initConfig({
watch:{
options: {
livereload: true
}
},
express: {
options: {
port: 9000,
hostname: '*'
},
proxies: [
{
context: '/_',
host: 'localhost',
port: 8080
}
],
livereload: {
options: {
livereload: true,
bases: ['static']
}
}
}
});
grunt.registerTask('default', ['configureProxies', 'express', 'watch']);
I end up with having spawned two separate servers:
Running "configureProxies" task
Running "express:proxies" (express) task
Running "express-server:proxies" (express-server) task
Web server started on port:9000, no hostname specified [pid: 4348]
Running "express:livereload" (express) task
Running "express-server:livereload" (express-server) task
Port 9000 in use
Web server started on port:9001, no hostname specified [pid: 4348]
Running "watch" task
Waiting...
did you get anywhere with this ? Please let me know if you had any luck with this.