ziggy6792 / typescript-journey

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript Monorepo starter

By Simon Verhoeven

Getting started

  • yarn install
  • yarn build build packages
  • yarn dev run locally for development
  • yarn deploy deploy with SST

Using this example

Run the following command:

npx create-turbo@latest

What's inside?

This Turborepo includes the following packages/apps:

Apps

  • lambda-api: a Nest.js hello world app
  • sst-app: sst Deployment code deploys stack to AWS
  • cdk-app: cdk Deployment code (alternative) deploys stack to AWS
  • vite-app: Vite.js Frontend App runs on http://localhost:5173/
  • next-app: Next.js Frontend App runs on http://localhost:3000/

Packages

  • common: Common code shared between packages
  • eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo

Each package/app is 100% TypeScript.

Utils

  • local-lambda-server runs lambda-api app on localhost:4000

Tools

This Turborepo has some additional tools already setup for you:

Build

To build all apps and packages, run the following command:

yarn build

Deploy

To deploy use the following command

yarn deploy

Develop

To develop all apps and packages, run the following command:

yarn dev

Remote Caching

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:

cd my-turborepo
npx turbo login

This will authenticate the Turborepo CLI with your Vercel account.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

npx turbo link

Useful Links

Learn more about the power of Turborepo:

About


Languages

Language:TypeScript 68.1%Language:JavaScript 20.3%Language:CSS 9.8%Language:Dockerfile 1.0%Language:HTML 0.7%