Skip to content

Latest commit

 

History

History
103 lines (67 loc) · 2.72 KB

readme.md

File metadata and controls

103 lines (67 loc) · 2.72 KB

manygolf

Build Status

massively multiplayer procedurally-generated 2d golf. think desert golf + trackmania

play

https://manygolf.club/

dev guide

installing

after cloning the repo, run npm install in the project root to get all necessary dependencies to build, test, and run.

running

in two different sessions:

npm run server-watch
npm run client-watch

and navigate to localhost:8080

test

npm run test-watch

production

create a secret.json with ssh & sentry deets

{
  "host": "zombo.com",
  "username": "bigjeffrey",
  "path": "/home/bigjeffrey/manygolf",
  "ravenDSNPublic": "https://foo@app.getsentry.com/1234"
  "ravenDSNPrivate": "https://foo:bar@app.getsentry.com/1234"
}

on your server, make sure you have node+npm and forever (npm install -g forever) installed

then locally:

npm run deploy

this builds files locally and bundles up built files + source, deploys it to your specified path, and runs it.

the server runs using the forever tool. you can start/stop/look at logs with this.

it's up to you to expose the server (port 4080) and the files in build/ to the world. nginx can do it!

database

migrations

Manygolf uses the sqitch tool for DB migrations. To use locally:

createdb manygolf
cd sqitch
cp sqitch.conf.default sqitch.conf
sqitch deploy

This should create the local schema for you.

Sqitch is also used to deploy to remote targets. You can add a remote target to sqitch.conf using sqitch target add. sqitch.conf is gitignored for this reason. If you're using Heroku, you can add a remote target like this:

sqitch target add production "`heroku config:get DATABASE_URL --remote heroku`"

configuring locally

Manygolf uses dotenv to load the database configuration from a .env file. Just cp _env .env and replace the database URL with your local DB, e.g.:

DATABASE_URL=postgres://your_username_here@localhost:5432/manygolf

todos

https://trello.com/b/EfK64dEy/manygolf

credits