How to deploy React-VR to Heroku in minutes

React VR allows you to create compelling VR experiences. Heroku is one of the easiest way to deploy your web app.
In this tutorial, I will walk you through pushing your React-VR website to Heroku.

Created with Aaron Stack Barnes

  1. Clone the repo
yarn install
yarn start

2. open http://localhost:8081/vr/ in your browser. 
// this is to see initial build

Production Build and How to Deploy

npm run bundle 
// this creates a new folder called build under the vr folder
  1. Create a new folder on desktop called production
  2. Copy index.html, static_assets, and all contents from the new build folder to your new desktop folder production
  3. Rename index.html to home.html
  4. Open home.html
  5. Change line 9 from:

<script src=”./client.bundle?platform=vr”></script>
<script src=”./client.bundle.js”></script>

6. Change line 15 from:

// this will trick heroku to thinking this is a PHP app

7. Return to terminal and run:

cd desktop/production
touch composer.json
touch index.php
Open index.php
//and add the following:
"<?php header( 'Location: /home.html' ) ; ?>"
Open composer.json
//and add:

8. Return to terminal and run:

git add .
git commit -m “The future is now”
git push heroku master // assuming you have linked Heroku to this folder

9. Done! 
If you are interested in how to customize the images, add video, and the links checkout my github with a detail instructions on the readme.