Last active
August 28, 2015 21:23
-
-
Save danared/950a58920dd96c1df5bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local MongoClient = require("luaMongo.MongoClient") | |
local client = MongoClient.new("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 | |
exampleCollection:insert_one(document_to_insert) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment