Deploy
This tutorial teaches you how to deploy your Polymer Starter Kit application.
If you have not completed the Set up tutorial, do so now before attempting this tutorial.
Deploy with Firebase (recommended)
Firebase is a very simple and secure way to deploy a PSK site. You can sign up for a free account and deploy your application in less than 5 minutes.
The instructions below are based on the Firebase hosting quick start guide.
-
Install the Firebase command line tools.
npm install -g firebase-tools
The
-g
flag instructsnpm
to install the package globally so that you can use thefirebase
command from any directory. You may need to install the package withsudo
privileges. -
cd
into your project directory. -
Inititalize the Firebase application.
firebase login firebase init
Firebase asks you which app you would like to use for hosting. If you just signed up, you should see one app with a randomly-generated name. You can use that one. Otherwise go to https://www.firebase.com/account to create a new app.
-
Firebase asks you the name of your app’s public directory. Enter
dist
. This works because when you rungulp
to build your application, PSK builds everything and places it all indist
. Sodist
contains everything your application needs to run. -
Deploy.
firebase deploy
The URL to your live site is listed in the output.