I have a Mix project and I am trying to insert some data into my local database.
I have added the Mongo dependency to my project, then added the lines of code for connecting to the database and for storing data into it.
{:ok, pid} =
Mongo.start_link(
url: "mongodb://localhost:27017/tweet_processor")
{:ok, result} =
Mongo.insert_one(pid, "tweets", tweet_to_insert)
But I keep getting
{:error, %Mongo.Error{
code: 352,
host: nil,
message: "command failed: Unsupported OP_QUERY command: insert"}}
What could be the problem?