A FiveM resource to communicate with a MongoDB database using mongodb.
- I have included as many MongoDB methods as I could in this wrapper, even a couple that I could not find use for at present time. Maybe someone else will.
- Clone this repository to
fivem_mongodb
in your FiveMresources
folder. - Copy
fivem_mongodb/database.cfg
to your server root directory. - Add the following lines to your server config:
exec "database.cfg"
start fivem_mongodb
- Change
mongodb_url
, andmongodb_db
indatabase.cfg
. - Run
npm install
inresources/fivem_mongodb
directory.
- Add the following line to the fxmanifest of the resource you want to use fivem_mongodb in:
server_script '@fivem_mongodb/lib/MongoDB.lua'
I began working on this as a fork of fivem-mongodb and decided to create my own repo with full credit back to alcoholiclobster
. Also, huge shoutout to the Overextended group for technical discussions and support.