What config file I need to launch Remix application?
It has no index.html
file
Steps to reproduce (https://remix.run/docs/en/v1/guides/deployment):
npx create-remix@latest
? Where would you like to create your app? (./my-remix-app)
? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targets. (Use arrow keys)
❯ Remix App Server
? TypeScript or JavaScript? (Use arrow keys)
❯ TypeScript
cd my-remix-app
npm run build
And we have to directories: public, build
And what is the next step to show it on website.com
using nginx
?
2
Answers
The easiest is to choose the Remix App Server (which uses Express internally) or Express, then run
remix build
to build the app for production and runnpm start
to run the server.After that, it’s a normal Node.js server so you can configure your NGINX to forward requests on port 80 and 443 to your Remix app running in another port (3000 by default). This is normal Node.js + NGINX deployment, nothing specific of Remix.
right, you should build and start the node app first.
here’s an example: