Created
December 27, 2015 22:35
-
-
Save TomTasche/6c3ff778fe5552d9a184 to your computer and use it in GitHub Desktop.
dispatcher for multi-module appengine setups
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
// ... | |
var proxySnippet = require("grunt-connect-proxy/lib/utils").proxyRequest; | |
gruntConfig.connect = { | |
server: { | |
options: { | |
port: 9000, | |
hostname: "0.0.0.0", | |
keepalive: true, | |
middleware: function(connect, options) { | |
return [proxySnippet]; | |
} | |
}, | |
proxies: [{ | |
context: "/api", | |
host: "localhost", | |
port: 8081 | |
}, { | |
context: "/", | |
host: "localhost", | |
port: 8080 | |
}] | |
} | |
}; | |
grunt.initConfig(gruntConfig); | |
grunt.registerTask("dispatch", ["configureProxies:server", "connect"]); | |
// ... |
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
{ | |
// ... | |
"dependencies": { | |
"grunt-connect-proxy": "~0.2.0", | |
"grunt-contrib-connect": "~0.11.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment