REQUIRED environment variables:
POINT_SECRET
(Anything you want really...)set POINT_SECRET=ANYTHING-YOU-WANT
(Windows) orexport POINT_SECRET=ANYTHING-YOU-WANT
(Linux)
OPTIONAL environment variables (Set the key in your environment variables with the corresponding value you get from the provider) (Needed for the various features)
-
MASHAPE_KEY
(Mashape) https://www.mashape.com/. So setMASHAPE_KEY
to the key you get from Mashape.set MASHAPE_KEY=YOUR-API-KEY
(Windows) orexport MASHAPE_KEY=YOUR-API-KEY
(Linux) -
STEAM_KEY
(steam) http://steamcommunity.com/dev/apikeySpotify is a bit complicated, as there is an oauth flow. https://developer.spotify.com/web-api/ But you will need the following keys, and hopefully they're self explanatory
SPOTIFY_REFRESH_TOKEN
SPOTIFY_CLIENT_ID
SPOTIFY_CLIENT_SECRET
-
SOUNDCLOUD_CLIENT_ID
(soundcloud) (Note that is is just the client id and not the secret) http://soundcloud.com/you/apps (Create an app) -
TWITCH_CLIENT_ID
(twitch) https://www.twitch.tv/kraken/oauth2/clients/new
- Get Java
- Follow the instructions in this doc http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html#DynamoDBLocal.DownloadingAndRunning
In the server folder.
- Get Ruby + gems + rails http://www.tutorialspoint.com/ruby-on-rails/rails-installation.htm or use a nice installer http://railsinstaller.org/en (Ruby 2.2)
- Read up some docs http://www.tutorialspoint.com/ruby-on-rails/
- run
bundle install
to install dependencies - open a new terminal, run dynamodb by running
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
in the dynamodb folder - run
rails s Puma -b 0.0.0.0 -e development
in theserver
folder - For production
rails s Puma -b 0.0.0.0 -e production
Testing if the server ran properly.
http://localhost:3000/v1/eight_ball
should return a JSON response.
Notes:
bundle clean --force
to remove unused gem dependencies.
To connect to local DynamoDb
, use this:
Aws::DynamoDB::Client.new(endpoint: 'http://localhost:8000')
Note that the pusher.js client/secrets for development
are hardcoded into the app atm. Feel free to change them.
For ssl issues on windows when installing rubygems: https://gist.github.com/fnichol/867550#the-manual-way-boring
In the client folder.
- Get Nodejs v6+
npm install
gulp
To build for production:
gulp build