Add a Remix App to a pnpm Workspace Monorepo

Share this video with your friends

Social Share Links

Send Tweet
Published 2 years ago
Updated 2 years ago

In your pnpm monorepo, you can easily create new applications under your apps folder.

Here, you'll create a new Remix app by running the command pnpx create-remix@latest. The app you generate functions just like any other full featured Remix app!

Instructor: [0:00] Now that we have our pnpm workspace set up in that pnpm workspace YAML file, we actually want to have something hosted in that workspace. And so, the first step, what I want to do is I want to add a Remix application into that apps folder. [0:16] As the first step, let's go to the remix.run website and let's find out how to install and set our Remix. The first command that we see here already is we can run npx create Remix the latest. This should set up Remix for us. Let's have a look.

[0:34] Now what we want to do is we want to have that app created in the apps folder. What I'm going to do here is I'm on CD Internet apps folder and then I paste in the command. I might also want to use the pnpx, which is the pnpm equivalent for npx and then just run the command.

[0:52] Here, Remix asks where to install the application. I want to have it inside apps folder into my remix app, that's fine.

[1:00] I just want to have the basics for our example and also the Remix app service perfectly fine for this demo, but obviously feel free to choose whatever suits best to your needs.

[1:11] Again, we want to have TypeScript. Do we want to run pmpm install? Sure. Let's see what we got created here. We have actually a Remix app now living in our apps folder here.

[1:25] It is a fully fresh app created by the Remix setup procedure. You can see the node modules folder is also installed locally to that Remix app based on what that generated us.

[1:37] There's also a fully functional package.json with all the dependencies that Remix needs to run. There should also be some scripts in fact up here that we could run.

[1:47] We could just hear CD into my Remix app, and just do a pmpm run dev to launch the Remix app locally. This then opens at localhost:3000. If we go here we go here, localhost:3000, we see the Remix application running and serving.

egghead
egghead
~ a minute ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today