-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(examples): add with-nestjs
example
#8162
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 7 Ignored Deployments
|
@Neosoulink is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
with-nestjs
example integrationwith-nestjs
example
### Description - Add the `with-nestjs` example - Init a basic `web nextjs` app - Init a basic `api nestjs` app - use the basic turborepo config
### Description - Set general `eslint` & `perttier` config into `@repo/eslint-config` - Add a base `eslint` config file - Move common `eslint` & `prettier` support into `@repo/eslint-repo` - Add a base `prettier` file - Remove format script from `apps/api` and use root `format` script
### Description - Mix the root `,gitignore` with the `nestjs` generated `.gitignore`
### Description - Add a new tsconfig file for `nestjs` into `@repo/typescript-config`. - Add `@repo/typescript-config` as `apps/api` dev-dependency. - Extends `@repo/typescript-config/nestjs.json`
### Description - Add `@repo/jest-config` package - Configure a base common jest config file - Add a `nestjs` config file - Add a `nextjs` config file - Use `playwright` for `NextJs` e2e testing - Add a base unit & e2e Nextjs testes - Sync testes command with turborepo
### Description - Add a `@repo/api` package - Use `nestjs` environment setup - Add links `entity` and `dto` examples - Sync/Use `@repo/api` into `apps/api` - Add `Link` resource (CRUD) example - Sync/Use `@repo/api` into `apps/web` - Retrieve links frorm `apps/api` - Refactor root page unit-test for async component
### Description - Update the root `README` documentation - Update the `apps/api` `README` documentation - Update the `apps/web` `README` documentation
763f23f
to
30f350f
Compare
30f350f
to
240cb25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, nice to see you again!
A couple things before I go too deep:
- I'm seeing
turbo build
andturbo test:e2e
fail out of the box. Can this be fixed? - We've released Turborepo 2 since this was made. Would you be able to use
npx @turbo/codemod upgrade
to get upgraded? Thanks!
Hey @anthonyshew, Sure let me upgrade things |
### Description - Use `npx @turbo/codemod upgrade` to migrate to `turbo` v2 Co-Authored-By: Anthony Shew <35677084+anthonyshew@users.noreply.github.com>
### Description - Fix `turbo eslint` configs - Unified `prettier` & `turbo` config at `base.js` eslint config file - Use improved `build` script for `@repo/api` - Merge use only one `tsconfig` file - Correctly export files from output folder (`dist`) - remove unusued `tsup` & `swc/core` - Format codes with `turbo format` Co-Authored-By: Anthony Shew <35677084+anthonyshew@users.noreply.github.com>
Hey @anthonyshew, just updated it here's the updated video: Screen.Recording.2024-06-16.at.4.59.33.PM.mov |
Description
Related issue: #8131
I recently created an issue where I explained why it's useful to use
Nestjs
withTurborepo
.This PR adds a new example integration with
nestjs
!I recorded a short video showing how it's working:
turborepo_with-nestjs_commands-test.mov
Testing Instructions
This new example is located at
./examples/with-nestjs/
.It uses a basic
turborepo nextjs
forapps/web
and a customizednestjs
app located atapps/api
.To launch all the apps and packages in dev mode, run
pnpm run dev
.The
apps/api
server includes a basic resource (CRUD) example where theapps/web
use theapps/api
links.findAll
API methods to retrieve the displayed links.They use the same package
@repo/api
to retrieve the sharedentity
anddto
s.Even if the
@repo/api
mainly uses thenestjs
configuration, it can be used for Nextjs and/or any other kind of apps.For more information, I documented it in the
root/README
Will close #8131