/react-oslo-meetup-vr-demo

A simple WebVR demo application. Built with React and a-frame. And a "remote-control" page using sockets.

Primary LanguageJavaScriptMIT LicenseMIT

React Oslo Meetup - WebVR Demo

Just a simple demo site built with react and redux. With a simple node auth app using JSON web tokens. The app is not hooked up against any database. Users and secret are defined in the .env file. (use the .env.dist as template)

Build Status codecov dependencies eslint

Installation

If you've never used Node or yarn before, you'll need to install them. If you use homebrew, just run:

brew install node
brew install yarn

Otherwise, you can download and install from here and here.

Install dependencies

yarn install

This runs through all dependencies listed in package.json and installs them locally within the project.

Running build scripts

npm run dev

This will compile your assets and start a express server with webpack-dev-middleware and webpack-hot-middleware.

Preview production environment

npm run prod
npm start

This will minify and hash all assets etc.

Testing with AVA

This repo includes a test suite running AVA and Sinon.

To run the tests simply run:

npm t

Usage

The landing page is in a paused state when the project is first built. To show a demo, you have to log in to the admin panel which is located at /admin. Set up a user with a password in your .env config file and use that information to log in.

Inside the admin panel you should see a dashboard with buttons for each of the registered demos. To activate a demo just press it, and make sure the "play" button is active.

Now a demo should be active on the default route.

Publishing to Heroku

This repo contains all necessary files to publish straight to Heroku using the Heroku CLI.

This guide will tell you all about how to publish to heroku using git.

And make sure you add the secret and user ENV vars to heroku to avoid having to push sensitive data to github.

heroku config:add SECRET='your secret' USERS='[{"id":1,"username":"john","firstName":"John","lastName":"Doe","password":"1234"}]'

Code style

This repo follows the airbnb javascript coding style guide. It also includes some default editor settings using editor config.

License

React Redux Starter is licensed under The MIT License (MIT).