Git Product home page Git Product logo

ember-s3-redis-deploy's Introduction

DON'T USE THIS!

This is old, use this instead https://github.com/ember-cli/ember-cli-deploy

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 ember-cli/ember-cli#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);
  });
});

ember-s3-redis-deploy's People

Contributors

moudy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.