- 
      
 - 
        
Save korrio/05d49e70c174da5cd18749cc6adc295c to your computer and use it in GitHub Desktop.  
Revisions
- 
        
rogeriochaves revised this gist
Mar 25, 2017 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,20 @@ const express = require('express'); const server = express(); const request = require('request'); const proxy = require('http-proxy-middleware'); server.set('view engine', 'ejs'); const createProxy = (path, target) => server.use(path, proxy({ target, changeOrigin: true, pathRewrite: {[`^${path}`]: ''} })); createProxy('/header', 'https://microfrontends-header.herokuapp.com/'); createProxy('/products-list', 'https://microfrontends-products-list.herokuapp.com/'); createProxy('/cart', 'https://microfrontends-cart.herokuapp.com/'); server.get('/', (req, res) => res.render('index')); const port = process.env.PORT || 8080; server.listen(port, () => { console.log(`Homepage listening on port ${port}`); });  - 
        
rogeriochaves revised this gist
Mar 24, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const createProxy = (path, target) => app.use(path, proxy({ target, changeOrigin: true, ignorePath: true })); createProxy('/header', 'https://microfrontends-header.herokuapp.com/'); createProxy('/products-list', 'https://microfrontends-products-list.herokuapp.com/'); createProxy('/cart', 'https://microfrontends-cart.herokuapp.com/'); app.get('/', (req, res) => res.render('index'));  - 
        
rogeriochaves renamed this gist
Mar 24, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. - 
        
rogeriochaves created this gist
Mar 24, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ const express = require('express'); const app = express(); const request = require('request'); const proxy = require('http-proxy-middleware'); app.set('view engine', 'ejs'); const createProxy = (path, target) => app.use(path, proxy({ target, changeOrigin: true, ignorePath: true })); createProxy('/header', 'https://microfrontends-header.herokuapp.com/'); createProxy('/productsList', 'https://microfrontends-products-list.herokuapp.com/'); createProxy('/cart', 'https://microfrontends-cart.herokuapp.com/'); app.get('/', (req, res) => res.render('index')); app.listen(8080, () => console.log('Homepage listening on port 8080!'));