forked from GoogleCloudPlatform/fda-mystudies
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proxy server setup for Participant manager web app
- Loading branch information
1 parent
860e837
commit af45f0e
Showing
4 changed files
with
434 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var express = require("express"); | ||
var app = express(); | ||
let cors = require("cors"); | ||
app.get("/app1", function (req, res) {}); | ||
app.use(cors()); | ||
app.listen(3001); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var express = require("express"); | ||
var app = express(); | ||
let cors = require("cors"); | ||
var httpProxy = require("http-proxy"); | ||
var apiProxy = httpProxy.createProxyServer(); | ||
var particpantManageServerUrl = "http://192.168.0.44:8003/", | ||
authServerUrl = "http://35.193.185.224:8087"; | ||
app.use(cors()); | ||
app.all("/participant-manager-service/*", function (req, res) { | ||
apiProxy.web(req, res, { target: particpantManageServerUrl }); | ||
}); | ||
app.all("/oauth-scim-service/*", function (req, res) { | ||
apiProxy.web(req, res, { target: authServerUrl }); | ||
}); | ||
app.listen(3000); |
Oops, something went wrong.