Created
December 2, 2019 10:55
-
-
Save jkyberneees/1e7e56336d8a225e471ac7c347e5d7b2 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
// cache middleware | |
const cache = require('http-cache-middleware')() | |
// enable http cache middleware | |
const gateway = require('fast-gateway') | |
const server = gateway({ | |
middlewares: [cache], | |
routes: [{ | |
prefix: '/tasks', | |
target: 'http://tasks.service' | |
}, { | |
prefix: '/users', | |
target: 'http://users.service' | |
}] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment