Loading repository data…
Loading repository data…
customerio / repository
An ember-cli-deploy plugin to upload index.html files to a REST API
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An ember-cli-deploy plugin to upload index.html files to a REST API. This is useful if you wrap your Ember app in a traditional web app, such as Rails.
Your REST API should follow the spec below. Note that the base URL is configurable; for these examples we assume it's https://yourapp.com/ember-revisions.
GET /ember-revisions: returns a JSON array of objects for the stored revisions. Fields are id (revision key), created_at (upload timestamp), revision_data (usually contains revision metadata) and current (boolean)POST /ember-revisions: expects a JSON body with fields id (revision key) and body (the index.html contents)PUT /ember-revisions/<id>: activates the revision with key idTo get up and running quickly, do the following:
Ensure [ember-cli-deploy-build][4] is installed and configured.
Install this plugin
$ ember install ember-cli-deploy-rest
config/deploy.jsENV.rest = {
baseUrl: 'https://yourapp.com/ember-revisions',
username: '<your-deploy-username>'
password: '<your-deploy-password>'
}
$ ember deploy
For detailed information on what plugin hooks are and how they work, please refer to the [Plugin Documentation][2].
uploadwillActivateactivatedidDeployfetchInitialRevisionsfetchRevisionsupload hookactivate and fetchRevisions hooksSee the Contributing guide for details.
Inspired by and based on ember-cli-redis by Aaron Chambers and the ember-cli-deploy team. Thanks!