Setup PNPM Workspace
Although I wrote a post on how to setup a workspace using Bun this time I’m starting with a PNPM Workspace. It’s almost the same, I just felt like using PNPM so the steps are pretty easy:
mkdir rapinsel && cd rapinsel
pnpm init
This will create a package.json. My stripped-down version looks like this:
{
"name": "rapinsel",
"version": "0.0.1",
"license": "MIT"
}
Now it’s time to create a pnpm workspace by creating a pnpm-workspace.yaml
file and define the directories we need for our project. You are pretty much free to use any layout you want but I’ve seen many people using a packages
directory like this:
packages:
- "packages/*"
Inside this packages
directory we will create our two projects.
mkdir backend frontend
In the next chapter we will start on the backend in Rust: see you there my friend.