-
Notifications
You must be signed in to change notification settings - Fork 18
nodeGame on Heroku
Important! Heroku's infrastructure is designed to keep your instance alive for about 24hours, after which it will be killed and restarted on another host. However, there is no guarantee that the restarting will not happen earlier. When the app is restarted, both the file system and the memory are cleared and cannot be recovered. You should take this account in the development of your game, or use another provider that is always on, such as Digital Ocean.
-
First, install the heroku CLI tools & create an account.
-
Clone the nodegame-heroku repository.
git clone git://github.com/nodeGame/nodegame-heroku.git cd nodegame-heroku
-
Replace the default ultimatum game inside the games/ folder with the game of your own. Important! If you adding a git repository make sure to add it as submodule:
git submodule add https://github.com/user/mygame games/mygame
-
Make sure to be at the top level of your nodegame-heroku repository.
-
Add your changes to the git index.
git add -u git commit -m 'added my game'
-
Run heroku create, which prepares Heroku to receive the code.
heroku create
-
Push your code to heroku.
git push heroku
-
Ensure that at least one instance of your Heroku app is running.
heroku ps:scale web=1
-
Visit your app (might need to adjust the full uri).
heroku open
-
If somethings goes wrong, you can look at the logs:
heroku logs
If your game/s installed as submodule/s got updated, you need to pull each of them manually:
cd games/mygame
git pull
Then, commit changes and push to Heroku:
git add -u
git commit -m "games updated"
git push heroku
Go back to the wiki Home.
Copyright (C) 2021 Stefano Balietti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.