Skip to content

Instantly share code, notes, and snippets.

@mikegrassotti
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikegrassotti/ed01f9c4ce4974bb8b76 to your computer and use it in GitHub Desktop.
Save mikegrassotti/ed01f9c4ce4974bb8b76 to your computer and use it in GitHub Desktop.
MVP ember-cli with rails-api on heroku

EMBER-CLI + RAILS-API = EASY

ember-cli 0.1 is out lets celebrate by making lots of apps on heroku

Install prerequesites...

npm install -g ember-cli
gem install rails-api
brew cask install heroku-toolbelt

Generate project files for client && server and init repo....

PROJECT_NAME=my-project
mkdir $PROJECT_NAME && cd $PROJECT_NAME
ember new $PROJECT_NAME --skip-git
mv $PROJECT_NAME client
rails-api new $PROJECT_NAME --database=postgresql
mv $PROJECT_NAME server
git init
git add -A && git commit -m "initial commit"

Prep for heroku...

echo "gem 'rails_12factor'" >> server/Gemfile
(cd server && bundle install)
(cd client && ember build --environment=production --output-path=../server/public)
git add -A && git commit -m "prep for heroku"

Deploy to heroku

heroku create
git subtree push --prefix server heroku master

heroku open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment