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

How to use versioning in v7? #165

Open
shobhitmshr002 opened this issue Jun 20, 2022 · 1 comment
Open

How to use versioning in v7? #165

shobhitmshr002 opened this issue Jun 20, 2022 · 1 comment

Comments

@shobhitmshr002
Copy link

shobhitmshr002 commented Jun 20, 2022

I want to use something like @Version in v7

@shekohex
Copy link
Member

I guess Nest already support Versioning. So you should use that, And If you are looking to use the nest-router as versioning solution, then you can do that too by creating a top level router with a prefix/path of v1 or v2 ..etc and based on that you can use two modules for each one of these, here is an example in code for better understanding:

const routes: Routes = [
    {
      path: '/v1',
      module: UsersV1Module,
      children: [
		...
	],
    },
    {
      path: '/v2',
      module: UsersV2Module,
      children: [
		...
	],
    },
  ];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants