-
Hi. Any recommendations on how to deploy to DigitalOcean? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Solution found. It's actually easy. First install the node adapter https://kit.svelte.dev/docs/adapter-node Do a local build with In the Then push to your source control and link on Digital Ocean. In my case, I used App Platform Make sure to add your environment variables which you can do in App Settings. This was the kicker: Set the HTTP port to listen to the port you configured or that's running in the App console The Run Command would initially be empty (that's what was causing the error To fix that, set the run command to Happy coding 🤗 |
Beta Was this translation helpful? Give feedback.
Solution found. It's actually easy.
First install the node adapter https://kit.svelte.dev/docs/adapter-node
Do a local build with
npm run build
to make sure everything is okay.In the
package.json
change the preview command from "preview": "vite preview" to"preview": "vite preview --host"
Then push to your source control and link on Digital Ocean. In my case, I used App Platform
Make sure to add your environment variables which you can do in App Settings.
This was the kicker:
Click on the Components
Set the HTTP port to listen to the port you configured or that's running in the App console
The Run Command would initially be empty (that's what was causing the error
[2024-09-07 22:23:54…