Get all the base paths of `use` apps
See original GitHub issuepolka()
.use("counter", createStateApp(require("./fsm/counter.js")))
.use("search", createStateApp(require("./fsm/searchMachine.js")))
Is it possible to register a root path that has access to all the sub-apps?
like?
const app = polka()
.use("counter", createStateApp(require("./fsm/counter.js")))
.use("search", createStateApp(require("./fsm/searchMachine.js")))
.get("/", (req, res) => {
Object.keys(app.apps).map(...)
})
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
App base path from a module in NodeJS - Stack Overflow
In one of my routes I'm doing some file manipulation and I need to know the base app path. if I use __dirname...
Read more >API Host and Base Path - Swagger
REST APIs have a base URL to which the endpoint paths are appended. The base URL is defined by schemes , host and...
Read more >Base Path - next.config.js
js application under a sub-path of a domain you can use the basePath config option. basePath allows you to set a path prefix...
Read more >Routing - Express.js
Here are some examples of route paths based on strings. This route path will match requests to the root route, / . app.get(' ......
Read more >Firebase Remote Config - Google
The Remote Config client library get methods provide a single access point for parameter values. Your app gets server-side values using the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, sorry, it’s here: https://discord.gg/xrRvfYV
Not recommend because you’re relying on Polka internals to do something. It’s not documented as public API because it’s not meant to be used. For example,
this.apps
is removed in upcoming 1.0I want to mount n-subapps to different root paths. Then I want have a main apps root path to respond with all the available subapps root paths. So I guess I can just keep that relation outside of polka in the first place: