Skip to content

Instantly share code, notes, and snippets.

@rzvdaniel
Last active July 6, 2019 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rzvdaniel/35cc0358617118519816862019911d5e to your computer and use it in GitHub Desktop.
Save rzvdaniel/35cc0358617118519816862019911d5e to your computer and use it in GitHub Desktop.
[Medium] Moleculer Routing - Default Configuration
const ApiGateway = require("moleculer-web");
module.exports = {
name: "api",
mixins: [ApiGateway],
settings: {
port: process.env.PORT || 3000,
routes: [{
path: "/simple",
whitelist: [
// Access to any actions in all services under "/api" URL
"**"
]
}]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment