remix: how to update your server target

2022-01-31

 | 

~2 min read

 | 

336 words

When creating a new Remix application, the recommended way to use the CLI:

% npx create-remix@latest

This will walk you through a series of questions to bootstrap the app per your specifications.

One of the questions is:

? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targe
ts. (Use arrow keys)
❯ Remix App Server
  Express Server
  Architect (AWS Lambda)
  Fly.io
  Netlify
  Vercel
  Cloudflare Pages
(Move up and down to reveal more choices)

I started developing with the Remix App Server, but at some point I wanted to actually deploy my site. I have had great experience with Netlify and Vercel in the past, so I thought I’d apply a server adapter and deploy to one of those targets.

Unfortunately, it’s not quite that simple.

In the community Discord, the suggested approach for converting any Remix app from one deployment target to another was the following:

  1. Create new temp remix app with new host config
  2. Drag custom app code over
  3. Delete extra code from original app, leaving only my .git directory
  4. Drag everything back to the original directory
  5. Commit

The one gotcha with this approach that I have already encountered is that these steps don’t account for dependencies you may have added in developing the original app.

So, I would modify these steps ever so slightly:

  1. Create new temp remix app with new host config
  2. Initial the new project as a git project
  3. Commit the project as an initial commit
  4. Drag custom app code from the original app over to the new app
  5. Run the project in dev (and if it doesn’t run, fix it)
  6. Delete extra code from original app, leaving only my .git directory
  7. Drag everything back to the original directory
  8. Commit

That said, it’s really not that difficult, though if Remix does make this transfer process simpler in the future, I wouldn’t mind!


Related Posts
  • Exploring Remix


  • Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!