chapter thirteen

13 Deploying

 

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.

13.1  Deploying to any HTTP server

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:

13.2  Using Netlify

13.2.1  Netlify from the website

13.2.2  Netlify from the command line

13.2.3  Netlify Plans

13.3  Using Vercel

13.3.1  Vercel from the website

13.3.2  Vercel from the command line

13.3.3  Vercel tiers

13.4  Using Docker

13.5  Summary