#How to deploy Remix + Express on a VPS?

1 messages · Page 1 of 1 (latest)

fossil condor
#

After npm run build I have a build folder with 2 folders: client and server.
And I rsync them to the server and setup nginx block location / for localhost:3000 etc.
But the question is when I copied the 2 folders on my vps in e.g. /var/myremix/ folder so now I see:

/var/myremix/client/ and
/var/myremix/server/

inside.

And when I am there in /var/myremix/ folder, what should I type to run the whole remix app with express on port 3000?

sullen galleon
#

in build/client you have public client assets and in build/server you have main server file built so you can import it into your server.
if you want to run it using basic remix server that uses express under the hood you can use remix-serve iirc

#

"start": "remix-serve ./build/server/index.js"

fossil condor
#

I am using express not the built in implementation the remix team is using.

#

Do you know how to run it?

sullen galleon
fossil condor
#

What does that link suppose to mean?

sullen galleon
#

It's express template with remix

fossil condor
#

How do you run it after you copy the files to the server?

severe dust
#

NODE_ENV=production node ./server.js or npm run start

fossil condor
#

in which folder it is? client?

sullen galleon
#

it's the project directory

fossil condor