ember-s3-redis-deploy

1.0.1 • Public • Published

ember-s3-redis-deploy

A very specific command line script to build an Ember app, push it to S3, and update redis with the "index.html" contents. dotenv loads and environment file based on the --environment option. It should contain REDIS_URL, S3_BUCKET_NAME and AWS credentials required by aws s3 sync.

Keep an eye on https://github.com/stefanpenner/ember-cli/issues/1256 to see if something better comes along.

Installing

npm install --save-dev ember-s3-redis-deploy

Deploying

# adds the key 'photos-cms-client-app/canary/index.html' 
# with the contents on 'app/index.html' to redis 
ember-s3-redis-deploy --environment production --release stable

Serving

In the server app use the buildReleaseKey convenience function to construct the key name saved in redis.

var buildReleaseKey = require('ember-s3-redis-deploy').buildReleaseKey;
 
/*
 * Omitted server code
 */
 
app.get('/', function (request, response) {
  // opionally allow for loading different releases
  // i.e. example.com?release=beta
  var release = request.query.release || 'stable';
 
  var key = buildReleaseKey({
    appName: 'my-ember-app-name',
    release: release
  });
 
  var html = redisClient.get(key, function (html) {
    response.send(html);
  });
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i ember-s3-redis-deploy

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • moudy