Advice on setting up a monorepo

Hey there! I have a project that I want to divide into three parts (see picture) and an api / types directory. I did some research and a monorepo sounded like the best bet. I then got into turborepo and the set up is honestly pretty confusing and seems to be a lot more than what I really need. I just want some way that I can reference a shared types directory, a way to separate out the three components of my app, and a way to run all three from the root directory. Is there a no-bs way to do this that I can get up and running relatively easily?
No description
2 Replies
dys 🐙
dys 🐙3d ago
In the root package.json:
"workspaces": {
"packages": ["apps/*"]
},
"scripts": {
"bot:start": "pnpm --filter=bot run dev",
"server:start": "pnpm --filter=server run dev",
"web:start": "pnpm --filter=web run dev",

}
"workspaces": {
"packages": ["apps/*"]
},
"scripts": {
"bot:start": "pnpm --filter=bot run dev",
"server:start": "pnpm --filter=server run dev",
"web:start": "pnpm --filter=web run dev",

}
Where bot in --filter=bot is the name from the package.json in the bot/ directory.
vince
vinceOP3d ago
Hey that's easy enough, thanks!

Did you find this page helpful?