bmullan91 / express-subdomain

Super simple subdomain middleware for expressjs
414 stars 49 forks source link

Combining subdomain with path #63

Closed amokrunner closed 2 years ago

amokrunner commented 2 years ago

Without this, I could do this: const myRoutes = express.Router() ... app.use('/my-path', myRoutes)

Now, how can I combine these paths w/ subdomain? I try: router.use('/my-path', myRoutes) app.use(subdomain('api', router)) but doesn't seem to work. Any examples of this?

amokrunner commented 2 years ago

Nevermind. What I did above worked after all.