cssmgdb is a lightweight MongoDB connector for your FiveM server.
Firstly add your connection URI to the server .cfg, example:
[!] Remember to add your database in URI at the end (example: /fivem
)
set mongo_connection_uri mongodb://localhost:27017/fivem
Add this to fxmanifest.lua
, in order to access MongoDB object
server_script '@cssmgdb/server/MongoDB.lua'
Now you can use MongoDB connector!
For more information visit documentation