Skip to content

Instantly share code, notes, and snippets.

@dirkk0
Created September 2, 2012 21:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dirkk0/3604699 to your computer and use it in GitHub Desktop.
Save dirkk0/3604699 to your computer and use it in GitHub Desktop.
Install Browserquest on Amazon EC2 (revisited)
apt-get install -y curl build-essential pkg-config bison git npm nodejs
git clone https://github.com/mozilla/BrowserQuest.git
npm install underscore log bison websocket websocket-server sanitizer memcache
cd BrowserQuest/client
npm install -g http-server
cp -r ../shared .
cd config
curl http://169.254.169.254/latest/meta-data/public-ipv4 > public.ip
sed -e "s/Set production websocket host here/`cat public.ip`/g" config_build.json-dist > config_build.json
sed -e "s/Set local dev websocket host here/`cat public.ip`/g" config_local.json-dist > config_local.json
cd ../..
screen -S client -dm bash -c "cd client;http-server"
screen -S server -dm bash -c "node server/js/main.js"
@brynnb
Copy link

brynnb commented Sep 16, 2012

Thanks for this, made things easier for me to figure out. Some clarification by what the production/local dev websockets are and where to find them would be helpful!

@brynnb
Copy link

brynnb commented Sep 16, 2012

Woops, nevermind, it adds the IP in itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment