Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Overview

Lean's edited this page Nov 8, 2023 · 1 revision

Overview

This overview will teach you how the servers work and how you can manage some things.

start-server.js file

In the first file that server read is the start-server.js, also you open it with node start-server.js, the firsts lines you see that the server ask for serverDatabase and worldDatabase in ./database/config this location saves the database configuration such IP addres, account name and password, etc.

initializeServer(), the first function called to start the server, inside that function we have all the methods to start connecting to the database, responses and reading configurations of the server, in order we have:

0 - Configuration

1 - Database Connection

2 - Http Responses

3 - Sockets Responses

Also after reading the world database we have another method to read all datas from worlds database and save in navigator.

database folder

The primary file is the config.js this will tell the server what the credentials for login into database, just a simple file containg the informations for login.

accountsTable is the connection for the accountsTable, this is necessary to query datas and update in database

worlds folder contains all the worlds tables in database, this is necessary to automatically create and for the server read the world, every single world needs to be in that folder.

Clone this wiki locally