This Remix template is configured to output a Nintendo Switch homebrew application which serves the Remix application, using nx.js. You can use nx.js APIs in your loader()/action() functions in your Remix routes.
Run the following command to copy this template:
npx create-remix@latest --template TooTallNate/remix-nxjsThe development server mode involves running the Remix server .nro file on the Switch, while also running the "dev" script on your local machine:
- Run the
build:devscript:npm run build:dev
- Create the dev mode
.nrofile:npm run nro
- Upload the
.nrofile to your Switch and launch the app from the Homebrew Launcher - Run the
devscript on your local machine, passing the URL to your Switch Remix app. This script monitors for file changes in theappdirectory, rebuilds the Remix app, and then uploads the new server bundle to the/__devendpoint for the Switch to use for future HTTP requests:# IMPORTANT: Replace with your own Switch's IP address npm run dev http://192.168.86.103:8080
First, run the build script to build your Remix app and place the client-side assets into the "romfs" directory:
npm run buildThen run the nro script to generate the final .nro file.
npm run nroPlace the .nro file onto your Switch's SD card inside the "switch" directory, and launch the app through the Homebrew Launcher (album menu). While the app is running, you can access your Remix application from a web browser using the IP address and port shown on the Switch screen.
- Add a square
icon.jpgfile in the root of the project to customize the icon of the NRO file - The following
package.jsonvalues are shown on the Homebrew Launcher:nameversionauthor
- Set the
titleIdproperty inpackage.jsonto a random 16 digit hex string (example:012a792e7a730000)- This allows your app to access Save Data via
localStorageinloader()/action()functions
- This allows your app to access Save Data via