"Hello World"-like server script for geckos.io

Hello,
I can understand basic JS, and I would like to make geckos.io server for my game, but I need starting point.

I need geckos.io’s version of this if you know what I mean.
Basically, the basic code that will work, so I can add up things later according my needs.
Just like this is in HTML, I need something like this for geckos server.

<!DOCTYPE html>
<html>
    <head>
        <!-- head definitions go here -->
    </head>
    <body>
        <!-- the content goes here -->
    </body>
</html>

I did found these examples GitHub - geckosio/geckos.io: 🦎 Real-time client/server communication over UDP using WebRTC and Node.js http://geckos.io for server, but as expected, I get error message(s), like for example “Cannot use import statement outside a module”.

I tried on windows 10, with installed node.js and geckos.

If you have to ask, you probably do not have enough experience with GDevelop and JavaScript to tackle this problem, and most likely should use a pre-made library like https://thnk.cloud instead.

I remember when I was getting this kind of answers for more then a decade ago for another two programming languages I was starting to learn that were used to make mods for two games I used to play back then.
And eventually, I became what you would call “Senior Developer” in that area with 100+ sold private mods.

I am just saying, learning is not my problem, but the way I do it. A lot of people find it weird or whatever. I am self taught, and this is how I learn new languages.

Anyway, how can thnk.cloud help me with this? Correct me if I am wrong, but after compiling the game manually, there isn’t generated “server.js” or any other required file that I can upload to dedicated server and use it as a server where players can connect and play together.

Exactly my point. Eventually you’d be able to do it. Once you have the experience. But for now, you’re better off building upon existing tools rather than building those yourself.

THNK will allow you to add networking to your games with events, and provides multiplayer primitives (like object synchronization) & optimizations. It also supports numerous networking solutions, including geckos.io.

Right… and neither geckos nor anything else is able to generate a neat “server.js” out of your game that will magically make your game multiplayer. A server being just another machine, you can just make a normal linux build, and run the appimage on your server, you don’t need a javascript file.

Oh… I got your point now. I misunderstood one of the posts I saw about this topic, and thought that we actually have to have our own custom server to make this work. I apologize if I sounded rude.
I know how to build for windows (npm run build), can you tell me how to manually build appimage for linux?

You can also use the one click service, for convenience.
To make a manual Linux build, do the same process as on windows but on Linux

“Sorry, something went wrong. Come back later” when I try to use one click service.
I was using THNK Geckos example. Anyway, I installed snapcraft on linux (Oracle Linux 8), because it is required in order to build appimage, but when I use
“snap install snapcraft --classic” (As asked when trying to build) I am getting this error

Run configure hook of “snapcraft” snap if present (run hook “configure”: signal: segmentation fault)