Nearly instant setup

Just click this button to deploy the software to Heroku for you automatically on their free tier webhosting with the free tier compose.io MongoDB database.

You will have an opportunity to create your own Heroku account during the deployment if you don't have one already.

Deploy to Heroku

Manual setup

If you want to set the software up yourself on your own hosting you will need NodeJS and MongoDB which can run on any conventional web hosting including Digital Ocean (referral link), Amazon Web Services and Microsoft Azure.

Manual setup on Heroku

This is less necessary now that they have automated deployment from git repositories.

The database

  1. Create an account at Compose.io and make a database. The free one will be enough to get started.

  2. In the "Admin" tab of your database create a new user.

The server

  1. Create an account at Heroku. They have a great quickstart guide here.
  2. Create an application on your computer for Heroku and download the api server source from Github.
  3. In your Compose dashboard copy the "URI" from the "Admin" tab and put your user credentials in it, and then in your Heroku application:

    heroku config:set playtomic=mongodb://the_uri_you_copied
  4. Upload the application to Heroku via the command line:

    git add .
    git commit -m "Uploading server"
    git push heroku master
  5. Find your application URL via the command line:

    heroku apps:info

Scaling

This toolkit is designed to scale 'horizontally' by using eventual consistency, that means the more resources you assign it on Heroku the more capacity you can handle. Each 'dyno' or thread or equivalent for your hosting maintains its own caching and state that is periodically synced against your database or expired.

Heroku can be automatically scaled using HireFire.io to create and terminate 'dynos' as your load requires.

Your Compose database can be manually upgraded at any time through their website.

Recommended deployment

  • 2+ dynos at Heroku because inactive single-dyno applications hibernate
  • Use your own domain in case you ever move hosting
  • SSL to keep your player's activities private
  • 'Small' database plan (or larger) at Compose with Amazon S3 backups
  • HireFire configured to add a few more dynos when necessary
  • Pingdom for uptime monitoring