chapter thirteen
This chapter covers multiple ways to deploy Svelte applications. These include:
- Deploying to any HTTP server
- Using Netlify
- Using Vercel (formerly ZEIT)
- Using Docker
Writing a Svelte app is lots of fun, and it’s easy to run locally. But eventually you’ll want to deploy apps to a server that enables others to use them.
There are many more deployment options than what we will cover here, but we will review some popular choices.
Some services, such as Netlify and Vercel, support registering a source repository (such as GitHub, GitLab, or Bitbucket). After doing this, they watch the repository for changes. Every time changes are pushed, they rebuild the web app and serve the resulting files.
It is easy to deploy a Svelte application to any HTTP server. To demonstrate this we will use the Node-based Express server. Here are the steps: