nodejs bindings?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Aarstad

I need some help getting started with connecting godot with other languages, nodejs specifically. Say for instance I have some code written in nodejs that talks to an SQL server, and I wanted to include this in my godot project. How do I get started with this? Is this what gdnative does?

Any suggestions are helpful. thanks guys!

:bust_in_silhouette: Reply From: Calinou

There are no GDNative Node.js bindings I know of, so I’m afraid this isn’t possible unless you move the code to a remote server and “execute” it by calling API endpoints using HTTP requests (or by using Godot’s low-level StreamPeer API).

Creating a GDNative binding for Node.js may be possible, but it’s a difficult and time-consuming task.

:bust_in_silhouette: Reply From: Aarstad

What Calinou is saying is correct, but I did find a (hacky) workaround.

in npm there’s a module that allows you to establish tcp/udp communication between godot and nodejs:

The npm package link change
Some examples available here

Tilican | 2019-01-31 14:21