Wanna pull this repo down for some reason?? Awesome.
Have the following for parity:
ruby 2.4.1 bundler 1.15.4
Then:
git clone [email protected]:PopularDemand/zo-serve.git
cd zo-serve
bundle && rake db:create && rake db:migrate
rails s
The auth portion of the app has no graphic interface, so be great with curl or have Postman or a similar application. Hit up the routes from config/routes.rb
.
There is a minimal demo of the game located in the /demo
directory. It can be used to debug the ActionCable interactions. To run the demo:
- cd to the demo directory and serve the files from localhost:8000
cd demo
ruby -run -e httpd . -p 8000
- Alternative to the above comm
ands, there is a rake task:
rake demo:start
- If you absolutely must use a different port/IP configuration add a matching regex to the cable's whitelisted hosts in
application.rb
:config.action_cable.allowed_request_origins = [/localhost:8000/,/* your stuff here */]
- Start your rails server
- Navigate to localhost:8000
- Create Game -> Create Subscription -> Initialize Round
- Create game creates a game record in Rails' and returns the object
- Create subscription instantiates the GameChannel subscription
- Initialize round begins the back and forth socketry between user and server
The final product will eventually be available at this repo:
Happy hacking!
🎶 Are you dreaming, too? - Echos, Coda