What's the best way to start Svelte app on production server?

Viewed 2770

I'm using SvelteKit (1.0.0) with the node adapter.

I want to use it on my server and start it with pm2.

What's the best way of starting a Svelte app with a node adapter without npm start?

I don't need pm2 command, just an npm command for Svelte.

1 Answers
node build/index.js  # Start production server

Full example:

npm init svelte@next # Initialize project
npm install          # Install dependencies
npm run build        # Build production version
node build/index.js  # Start production server
Related