Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
local MongoClient = require("luaMongo.MongoClient")
local client ="mongodb://localhost:27017/")
local exampleDatabase = client:getDatabase("exampleDB")
local exampleCollection = exampleDatabase:getCollection("exampleCollection")
-- Create document to insert.
local document_to_insert = {foo = "bar"}
-- Insert document into database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.