Experimenting with different technologies that require client-server interaction
- Turborepo
- React v18, NestJs v14.1, ExpressJS, NestJS v10.3
- 100% Typescript
- Prettier and Eslint setup alongside
pre-commithook. - Dockerize images
- Github Actions to test apps & docker images build
The code for shared packages are in the packages folder & the applications code in the apps folder.
Install node_modules
yarnDue to some issues with express dependencies, you also need to run
npm dedupe
to scan your node_modules and moves dependencies up in the tree if different versions can be consolidated. Delete the package-lock.json after running this command.
Build, run, lint or test all your apps in one command thanks to Turborepo's Pipelines
To build all the shared packages,
turbo lib:buildEach of the applications have common scripts which can be easily executed in parallel by turborepo's pipelines. Add these in turbo.json.
| Command | Result |
|---|---|
dev |
Run development server |
build |
Build the application |
start |
Run the production build |
prod |
Build the app and then run the build |
lint |
Run eslint to fix code |
npm-check-updates is an excellent tool for detecting the latest versions of dependencies and updating them in your package.json. It simplifies the process of keeping your project up to date with the latest package versions.
To update all dependencies and devDependencies across the workspace, run:
ncu -ws --format group -uFollowed by
turbo buildIf you found these code snippets helpful and saved your valuable time, please consider buying me a coffee.