Add basic api unit. This unit will be responsible for providing all stf restful apis.

This commit is contained in:
Vishal Banthia
2015-12-02 18:18:31 +09:00
parent 7ea7871ec0
commit 41f306a7f0
7 changed files with 172 additions and 0 deletions

View File

@@ -51,6 +51,13 @@ module.exports = function(options) {
})
})
;['/api/*'].forEach(function(route) {
app.all(route, function(req, res) {
proxy.web(req, res, {
target: options.apiUrl
})
})
})
app.use(function(req, res) {
proxy.web(req, res, {
target: options.appUrl