vercel / turbo

Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turbopack and Turborepo.
https://turbo.build
MIT License
25.61k stars 1.74k forks source link

Examples: `with-nestjs` example implementation #8131

Closed Neosoulink closed 4 days ago

Neosoulink commented 2 months ago

What is the improvement or update you wish to see?

It would be great to have a with-nestjs example integrated

Is there any context that might help us understand?

Starting a NestJs project managed within turbo-repo is just great and I recommend it!

However, the turbo repo doesn't include an official example to start a NestJS Turbo-repo project.

Neosoulink commented 2 months ago

If it's possible, I'm volunteering to contribute to this one

anthonyshew commented 2 months ago

No one on our team has experience with Nest.js so we'd appreciate a contribution for this!

Cirilord commented 1 month ago

@Neosoulink what the config you use in launch.json for debug purpose in nestjs?

Neosoulink commented 1 month ago

Hey @Cirilord, I did not integrate a launch.json for this example

https://github.com/vercel/turbo/pull/8162

Cirilord commented 1 month ago

Do you have any idea what it would look like?

Neosoulink commented 1 month ago

@Cirilord, I'm not sure about the context... Could you share more details or needed behavior?

Cirilord commented 1 month ago

Sure, i'm trying to create a configuration inside launch file to debug my nextjs application

Neosoulink commented 1 month ago

@Cirilord okay... Note that you're free to configure your debugger as you prefer and it's beyond this issue's scope.

But, as an example, if you want to set a configuration that launches both apps in development mode (/api and web), you can use TurboRepo as follows:

{
  "version": "0.0.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch apps in dev mode (using turbo repo)",
      "runtimeExecutable": "pnpm",
      "runtimeArgs": ["run-script", "dev"],
        "env": {
          "NODE_ENV": "development"
      },
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    }
  ]
}

This configuration will execute the script at the root of your project and will launch your apps/packages in the development mode.

Cirilord commented 1 month ago

Thanks @Neosoulink! It worked very well