Commit 20a27148 by Vishal Kadam

Vishal: Added proxit for api calls

parent ec724d2c
......@@ -33,6 +33,7 @@
"method-override": "^1.0.0",
"morgan": "^1.0.1",
"path-extra": "~0.1.1",
"proxit": "^0.6.0",
"q": "~1.0.1",
"rc": "~0.3.4",
"serve-favicon": "^2.0.0",
......
......@@ -15,7 +15,15 @@ var path = require('path'),
nodeEnv: 'local',
root: rootPath,
port: process.env.PORT || 3010,
templateEngine: 'swig'
templateEngine: 'swig',
proxit: {
verbose: true,
hosts: [{
routes: {
'/api': 'http://162.249.6.76:21000/api'
}
}]
}
});
module.exports = config;
......@@ -13,6 +13,7 @@ var express = require('express'),
favicon = require('serve-favicon'),
methodOverride = require('method-override'),
swig = require('swig'),
proxit = require('proxit'),
config = require('./config');
module.exports = function(app) {
......@@ -26,6 +27,7 @@ module.exports = function(app) {
// The cookieParser should be above session
app.use(cookieParser());
app.use(proxit(config.proxit));
// Should be placed before express.static
// To ensure that all assets and data are compressed (utilize bandwidth)
app.use(compress({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment