Skip to content

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turborepo starter

This Turborepo starter is maintained by the Turborepo core team.

Using this example

Run the following command:

npx create-turbo@latest

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

  • docs: a Next.js app
  • web: another Next.js app
  • @repo/ui: a stub React component library shared by both web and docs applications
  • @repo/eslint-config: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • @repo/typescript-config: tsconfig.jsons used throughout the monorepo

Each package/app is 100% TypeScript.

Utilities

This Turborepo has some additional tools already setup for you:

Build

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

cd my-turborepo
pnpm build

Develop

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

cd my-turborepo
pnpm dev

Remote Caching

Tip

Vercel Remote Cache is free for all plans. Get started today at vercel.com.

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:


  • Initialized any empty turborepo project

  • Deleted the docs app

  • added the http-server and ws-server

  • Added the package.json folder in both by running ( npm inti -y)

  • Added the tsconfig.json in both the serves manually become we do not needed the pre filled tsconfig file

  • Extends/imported the base.json file in the tsconfig.json file and updated the package.json file of serves

  • Added a build,dev, start scrips to both the project

  • As we have changed the package.json we need to run npm i

  • Writeen a boiler plate code for http-server and ws-server

  • Write the signup,singin and create-room endpoint in http-server

  • Write the middleware that decodes the token and gate the create-room enpoint


-- How to add a commong package --> cohort excalidraw first video 1:43:00 -- What do we get in request parameter in ws library on connection Key properties of req: req.url – The requested WebSocket URL (including query parameters). req.headers – An object containing HTTP headers. req.socket – The TCP socket instance of the connection

-- How to iniitalize prisma

  • npx i prisma
  • npx prisma init
  • write down the schema as per need
  • npx prisma migrate dev --name "name of migration"
  • npx generate prisma --> generates the prisma client in nodemodules/@prismaclient
  • import the prisma client

-- how could we take any parameters in the endpoint like /chat/123 or /chat/899 - by using the /chat:id --> use params - by using the wild card --> /chat/* --> use URLSearchParams - /chat?filter=qe00 --> in this case we can get the query as req.query


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages