Skip to content

Deploy on DigitalOcean #146

Closed Answered by patra0o
patra0o asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by patra0o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant