Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for router #219

Closed
sukeshpabolu opened this issue Feb 7, 2024 · 3 comments
Closed

support for router #219

sukeshpabolu opened this issue Feb 7, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@sukeshpabolu
Copy link

Is there a support for router like we have in express?

Investigative information

Example provided

import someController from '../controllers/some.controller';
import { Router } from 'express';

const api = Router().use('/some', someController)
            
export default Router().use('/api', api);
@ejizba
Copy link
Contributor

ejizba commented Feb 7, 2024

No, I don't think we have something exactly like that. If you give more details on what you're trying to accomplish or specific parts you like about the express router, we might have something that accomplishes the same thing. If we don't, we could leave this open as a feature request

@sukeshpabolu
Copy link
Author

We organise our code in the form of module/view/controller using express, you can refer to this repo for an example. https://github.com/gothinkster/node-express-prisma-v1-official-app/tree/main. You can check src/routes/routes.ts file

@ejizba
Copy link
Contributor

ejizba commented Mar 13, 2024

If the primary reason you want this is so that you can more easily match your express application, then I think we can close in favor of this issue: #16

If you don't care about express and just want the feature itself, then I would need a lot more details including what specifically you want, why you want it, and why you can't accomplish it with the existing features.

@ejizba ejizba closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@ejizba ejizba added duplicate This issue or pull request already exists and removed Needs: Attention 👋 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants