An Ember CLI Deploy plugin to upload index.html to a firebase database
npm install ember-cli-deploy-firebase-database> An Ember CLI Deploy plugin to upload index.html to a firebase database
This plugin uploads a file, presumably index.html, to a specified Firebase Realtime Database.
More often than not this plugin will be used in conjunction with
A plugin is an addon that can be executed as a part of the Ember CLI Deploy pipeline. A plugin will implement one or more of the Ember CLI Deploy's pipeline hooks.
For more information on what plugins are and how they work, please refer to the [Plugin Documentation][1].
To get up and running quickly, do the following:
- Sign up for a Firebase account
- Install the ember-cli-deploy tool
``bash`
$ ember install ember-cli-deploy
- Install the ember-cli-deploy-build plugin
`bash`
$ ember install ember-cli-deploy-build
- Install this plugin
`bash`
$ ember install ember-cli-deploy-firebase-database
- Download a firebase service account key as per
- Place the following configuration into config/deploy.js
`javascript`
ENV["firebase-database"] = {
serviceAccountKeyPath: "./
firebaseAppName: '
}
- Run the pipeline
`bash`
$ ember deploy production
`bash`
ember install ember-cli-deploy-firebase-database
For detailed information on what plugin hooks are and how they work, please refer to the [Plugin Documentation][1].
- upload
For detailed information on how configuration of plugins works, please refer to the [Plugin Documentation][1].
A file matching this pattern will be uploaded to Firebase Database.
Default: 'index.html'
The node key at which to store the uploaded file.
Default: 'index_html'
The parent path to prepend to the indexKey path.
Default: '' i.e. the indexKey is stored directly under the root
The uid to be used to limit access to the database. Should be configured in your database rules e.g.
"index_html": {".write": "auth.uid === 'index_writer'"}
Default: 'index_writer'
The local path to the service account key downloaded from firebase, usually stored in the project directory.
The name of the firebase app you wish to upload to.
The following properties are expected to be present on the deployment context object:
- distDir (provided by [ember-cli-deploy-build][2])
* yarn test
doesn't workSince this is a node-only Ember CLI addon, we use mocha for testing and this package does not include many files and devDependencies which are part of Ember CLI's typical ember test` processes.
[1]: http://ember-cli-deploy.com/plugins/ "Plugin Documentation"
[2]: https://github.com/ember-cli-deploy/ember-cli-deploy-build "ember-cli-deploy-build"