Last active
September 3, 2020 17:09
-
-
Save rafaelaugustos/6fd828c1864b60951ce7cc55d55293c7 to your computer and use it in GitHub Desktop.
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 characters
import http from 'http' | |
import express from 'express' | |
import proxy from 'express-http-proxy' | |
const app = express() | |
const account = httpProxy('http://localhost:3001') | |
const cart = httpProxy('http://localhost:3002') | |
app.get('/cart', (req, res, next) => { | |
cart(req, res, next) | |
}) | |
app.get('/account', (req, res, next) => { | |
account(req, res, next) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment