forked from AkashKG/DiscussionPortalFrontEnd
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.js
More file actions
13 lines (13 loc) · 663 Bytes
/
server.js
File metadata and controls
13 lines (13 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
const express = require('express');
const app = express();
const proxy = require('http-proxy-middleware');
// Run the app by serving the static files
// in the dist directory
app.use(express.static(__dirname + '/dist'));
app.use('/api/*', proxy({target:'http://localhost:8080', changeOrigin:true}));
app.use('/userlogoutpage', proxy({target:'http://localhost:8080', changeOrigin:true}));
app.use('/userloginpage', proxy({target:'http://localhost:8080', changeOrigin: true}));
// Start the app by listening on the default
// Heroku port
app.listen(3410);
//ng serve --port process.env.PORT --proxy-config proxy.config.json || 3410 --proxy-config proxy.config.json