mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-23 00:06:18 -04:00
initial commit
This commit is contained in:
commit
f5b2b47136
46 changed files with 2350 additions and 0 deletions
67
docs/deploy-to-firebase-pretty-urls.md
Normal file
67
docs/deploy-to-firebase-pretty-urls.md
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Deploy to Firebase using Pretty URLs
|
||||
|
||||
Firebase is a very simple and secure way to deploy a Polymer Starter Kit 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](https://www.firebase.com/docs/hosting/quickstart.html).
|
||||
|
||||
1. [Sign up for a Firebase account](https://www.firebase.com/signup/)
|
||||
|
||||
1. Install the Firebase command line tools
|
||||
|
||||
npm install -g firebase-tools
|
||||
|
||||
The `-g` flag instructs `npm` to install the package globally so that you
|
||||
can use the `firebase` command from any directory. You may need
|
||||
to install the package with `sudo` privileges.
|
||||
|
||||
1. `cd` into your project directory
|
||||
|
||||
1. Inititalize the Firebase application
|
||||
|
||||
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](https://www.firebase.com/account) to
|
||||
create a new app.
|
||||
|
||||
1. Firebase asks you the name of your app's public directory. Enter `dist`.
|
||||
This works because when you run `gulp` to build your application, PSK
|
||||
builds everything and places it all in `dist`. So `dist` contains
|
||||
everything your application needs to run.
|
||||
|
||||
1. Edit firebase.json add rewrites section
|
||||
|
||||
{
|
||||
"firebase": "polymer-starter-kit",
|
||||
"public": "dist",
|
||||
"ignore": [
|
||||
"firebase.json",
|
||||
"**/.*",
|
||||
"**/node_modules/**"
|
||||
],
|
||||
"rewrites": [ {
|
||||
"source": "**",
|
||||
"destination": "/index.html"
|
||||
} ]
|
||||
}
|
||||
|
||||
1. Add `<base href="/">` to `head` in index.html
|
||||
|
||||
1. Remove `hashbang: true` in routing.html near bottom. The call to `page` should look like this now:
|
||||
|
||||
page();
|
||||
|
||||
1. Build
|
||||
|
||||
gulp
|
||||
|
||||
1. Deploy
|
||||
|
||||
firebase deploy
|
||||
|
||||
The URL to your live site is listed in the output.
|
||||
|
||||
You can see a demo of Polymer Starter Kit hosted on Firebase using pretty URLs at https://polymer-starter-kit.firebaseapp.com.
|
Loading…
Add table
Add a link
Reference in a new issue