Make sure you have Node.js installed on your machine. Then run the following command in the root directory of the project:
npm i
Then, to initialize the database, import the sql files in the sql
directory into your MySQL database. You can do this by running the following command in the root directory of the project:
mysql -u <username> -p <database_name> < sql/accounts.sql
mysql -u <username> -p <database_name> < sql/worlds.sql
mysql -u <username> -p <database_name> < sql/accounts_worlds.sql # these are the relations between accounts and worlds must be imported last
Finally, for bigger worlds, you must change the max_allowed_packet
variable in your MySQL configuration file. Make sure it's above 2MB for larger worlds. (might need to be bigger for even larger worlds)
Finally, create edit the config.json
file in the root directory of the project to match your database configuration.
To start the server, run the following command in the root directory of the project:
npm start
The server will start on port 2020 by default. You can change this by editing the config.js
file in the root directory of the project.