Skip to content

Instantly share code, notes, and snippets.

@nodox
Last active April 30, 2017 18:27
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 nodox/69bdf8e9faf40c4bd23c174fe9727d23 to your computer and use it in GitHub Desktop.
Save nodox/69bdf8e9faf40c4bd23c174fe9727d23 to your computer and use it in GitHub Desktop.
# Start a new ubuntu box
$ vagrant init ubuntu/xenial64
$ vagrant up
# Login to ubuntu box
$ vagrant ssh
# install nvm
$ sudo apt-get update
$ wget -qO- https://raw.githubusercontent.com/xtuple/nvm/master/install.sh | sudo bash
$ exit
$ vagrant ssh
$ sudo nvm install 6.9
# Install git
$ sudo apt-get install git
# Clone application
$ cd ~
$ git clone <URL>
# Start web app
$ cd <NAME>
$ npm install
$ node bin/www
# Close web app
Press CTRL-D on your keyboard
# Install heroku tools
$ sudo apt-get install software-properties-common # debian only
$ sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
$ curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install heroku
# Login and create new application
$ heroku login
$ heroku create myapp
#
$ echo "web: node bin/www" > Procfile
$ git add .
$ git commit -m "Heroku deployment setup complete"
$ git push origin master
$ git push heroku master
# End ubuntu box OS
$ vagrant destroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment