Closed mrweiner closed 3 years ago
@mrweiner No problem! The thing you built is just a tool for SSR, it is not a Node server in itself. Therefore, you need to create your own Node server and import the thing you built.
There's an example with Express here. You will need to remove everything related to process.argv
.
Hope that helps.
Ahhhh, okay gotcha, I thought something seemed off. That makes so much more sense! I'll see if i can get things running from that example. Thanks for the insight.
@frandiox this was just what I needed to get things running. Thanks again for the help!
I've ran the build and the dist/server directories are populated, but I don't really understand what I'm supposed to do to actually serve the application. I'm deploying to platform.sh, who has an example for node that includes:
So, in my app, I've replaced this with:
That serves up a 502 error, though, so it would seem that things aren't running as expected. Similarly, if I run
node dist/server/main.js
locally, I don't seem to get any feedback that anything is happening. I'm essentially using https://github.com/frandiox/vitesse-ssr-template/blob/master/src/main.ts with minor additions.I've never used node before so forgive my ignorance if I'm glancing over something obvious.