Installation
From Asset Library¶
Coming soon.
From Github¶
-
Download the code¶
Download the repo from the master or Releases section
-
Add to project¶
Copy the
mongo-driver-godot
folder from theaddons
folder from the downloaded zip to theaddons
folder in the directory of your Godot project. If your project does not already have aaddons
folder, make a new one. Your project folder should look something like this:
-
There is NO need to enable the plugin in ProjectSettings. You might need to close and open the project for the GDNative classes to register.
-
Minmal Example¶
Use the following snippet to connect to a database:
extends Control func _ready() -> void: var driver: MongoDriver = MongoDriver.new() var connection: MongoConnection = driver.connect_to_server("mongodb://localhost:27017") print(connection.get_database_names())