Browsergame made with Node.js and MySQL
Play an early demo version here: hackergameV2 (*server down)
Take a look at the Wiki to get started.
- Top players list
- Clans
- Terminal
- Servers
- Server software
- SSH Connections to your servers via terminal
- Realtime stockmarket
- Mail system
- Money transfers
Start by running apt updates and downloading and updated NodeJS installer (offial distro repositories usually outdated):
apt update
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
This will install the nvm script to your user account. To use it, you must first source your .bashrc file:
source ~/.bash_profile
Now, check which versions of NodeJS are available:
nvm list-remote
I recommend using one of the LTS: Fermium releases since this is what this fork was tested on:
nvm install v14.17.4
OR
nvm install lts/fermium
Verify that you’ve installed the new version by running node with the -v version flag:
node -v
pacman -S nodejs
git clone https://github.com/MarcelKaemper/HackergameV2.git
Create an account at https://finnhub.io/ to get a free API key to get access to live stock information.
Create the file public/javascripts/functions/secret.js
and fill in the credentials to your database.
You can create a basic structure of the database with the file in db/db_structure_##.sql
Example secret.js
module.exports = {
_DB: {
_HOST: "",
_USER: "",
_PASSWORD: "",
_DATABASE: "",
},
_API: {
_KEY: "" # https://finnhub.io/ API_KEY
}
}
npm install
node bin/www
OR
pm2 start bin/www
Access the game at http://[server-ip]:3000