We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Firstly, realy thanks for this amazing work! It's runing smoothly in the development environment.
There is a only dev environment server proxy and a comment for production purposes in "Webpack.config.js". https://github.com/me-12/single-spa-portal-example/blob/master/portal/webpack.config.js // Proxy config for development purposes. In production, you would configure you webserver to do something similar. proxy: { "/app1": { target: "http://localhost:9001", pathRewrite: {"^/app1" : ""} },.....................................................
Can you give an idea about how can i configure web server to do something similar?
Or is there another way?
Thanks, Türenç.
The text was updated successfully, but these errors were encountered:
This is my try by using node.js with express and http-proxy-middleware dependencies
------ code below ----------
const path = require('path'); const express = require('express'); const proxy = require('http-proxy-middleware'); const app = express();
app.use(express.static(path.join(__dirname, 'release')));
app.use('/app1', proxy({ target: 'http://localhost:9001', changeOrigin: true, pathRewrite: { '^/app1': '/', }}));
app.use('/app2', proxy({ target: 'http://localhost:9002', changeOrigin: true, pathRewrite: { '^/app2': '/', }}));
app.use('/app3', proxy({ target: 'http://localhost:9003', changeOrigin: true, pathRewrite: { '^/app3': '/', }}));
app.use('/app4', proxy({ target: 'http://localhost:9004', changeOrigin: true, pathRewrite: { '^/app4': '/', }}));
app.use('/app5', proxy({ target: 'http://localhost:9005', changeOrigin: true, pathRewrite: { '^/app5': '/', }}));
app.listen(9000);
Sorry, something went wrong.
No branches or pull requests
Hi,
Firstly, realy thanks for this amazing work!
It's runing smoothly in the development environment.
There is a only dev environment server proxy and a comment for production purposes in "Webpack.config.js".
https://github.com/me-12/single-spa-portal-example/blob/master/portal/webpack.config.js
// Proxy config for development purposes. In production, you would configure you webserver to do something similar.
proxy: {
"/app1": {
target: "http://localhost:9001",
pathRewrite: {"^/app1" : ""}
},.....................................................
Can you give an idea about how can i configure web server to do something similar?
Or is there another way?
Thanks,
Türenç.
The text was updated successfully, but these errors were encountered: