So, I was wondering if there is a way to load and use a .NET library on the server. I ask this because I want to set up a connection to a MongoDB server to store some data.
What I’ve tried:
I’ve downloaded the driver files from here and have put them into a folder on the server. I’ve then tried the following:
local reflection = clr.System.Reflection -- Load the mongodb drivers reflection.Assembly.LoadFrom("resources/test/lib/mongo/MongoDB.Driver.dll") client = clr.MongoDB.Driver.MongoClient( connectionString )
However, I get a “Object is nil” error on the last line. I’ve managed to figure out that “MongoClient” isn’t a class that can be called but, the documentation differs.
Any help would be appreciated
Note: I can use the MySQL library that came with essential so, I figure that it must be something to do with the library itself. Does it need a specific function or does it need to be compiled for a specific system?