项目作者: ebabel-games

项目描述 :
Simulate a fish tank with violent, hungry fishes! The Blessed Fish may come and heal fishes that attack him, otherwise it's each fish for himself.
高级语言: JavaScript
项目地址: git://github.com/ebabel-games/fish-tank-simulation.git
创建时间: 2018-09-01T01:14:30Z
项目社区:https://github.com/ebabel-games/fish-tank-simulation

开源协议:GNU General Public License v3.0

下载


Fish tank simulation

Node.js server-side simulation of an fishTank

Install

You need Node.js and npm from https://nodejs.org/

  1. npm install

Test

  1. npm test

Note: if a timeout occurs the first time the tests are run, try running again one more time. The timeout shouldn’t occur a second time. If it does, maybe something is wrong indeed.

Run locally in Development

  1. npm start

Browse http://localhost:8080

Deploy to Production

Any Node.js hosting will do, but I recommend free hosting, easy to deploy service “now”, from https://zeit.co/

  1. npm install -g now

You can deploy as many versions, each deployment is unique and kept published forever, for free.

  1. now --public

Browse https://fish-tank-simulation-[UNIQUE_KEY].now.sh where [UNIQUE_KEY] is generated during the deployment in your terminal.

Note: If you never installed now before, the first time you do an e-mail challenge will run to setup a token on your machine. If that happens, run now --public again to deploy.

You can see what you have deployed on https://zeit.co/dashboard/deployments - The free tier of https://zeit.co/ currently allows for up to 3 concurrent deployment. It’s possible to remove previous deployments and make room for new ones to stay in the free tier.

Appendix - notes/gist for testing fish-tank-simulation

https://gist.github.com/dgapitts/5127e58eab755ce8bd1b17327beb101e