[๐ŸŽ‰ 2.0.0] Rongo - MongoDB API Wrapper for Roblox

Is there a roblox-ts package for this wrapper?

2 Likes

Not at the moment, sorry!

Iโ€™ll look into potentially making one.

1 Like

Does this support self-hosted mongodb connections? Iโ€™m currently using MongoDB for a discord bot, and was wondering if this library supports self hosted MongoDB connections.

1 Like

For the moment it only supports the MongoDB Data API so youโ€™ll need to create your own API and edit the source for Rongo for it do work with self-hosted instances.

1 Like

[FIXED]:
Solution: In your Data API, copy the URL, and replace the 1 within the Module

Hello, Me and a couple others weโ€™re looking for an External DataStore Service and we decided to use MongoDB, after tinkering for a while I figured out how it worked, except this was all with-in Studio, weโ€™ve been trying to move Data to a different place except when you play the Client version of the game it keeps giving a โ€œHTTP 404 (Not Found)โ€ error, and I have changed the โ€œbetaโ€ Variable, but it only seems to work in Studio. Any ideas?

Image: (Client)
image
Image: (Studio)
image

5 Likes

Yeah it happened to me too. I think itโ€™s a bug

1 Like

Iโ€™m currently having an issue where itโ€™s returning nil for my collection.


Thatโ€™s the code, but when I do

print(Collection) 

it returns a table so it must have found my collection and when I do print(Collection) I get no errors. There is also stuff in that Collection so Iโ€™m unsure what Iโ€™m doing wrong.
image

1 Like

It worked at first but now itโ€™s not working?? Http requests and the enable api services is on.
image

For starters, spamming replies doesnโ€™t help.

Second, have you even tried debugging? You donโ€™t even show your code or anything. How can anyone help you?

2 Likes

Is this occurring in game or in studio?

1 Like

In-game, in studio it works most of the time.

1 Like

Whatโ€™s weird is Iโ€™m having a similar issue. In roblox studio it works fine, but in an actual roblox server it just returns Request Failed: HTTP 404 (Not Found)

1 Like

Make sure that you allow access from all IPs for your Data API, may fix it! @TheFastest10001 @weakslayer3000

1 Like

I added 0.0.0.0/0 in my network access, but itโ€™s still giving me this error.
Could Roblox or MongoDB done something that blocks access?

1 Like

Hmm, may be something on Robloxโ€™s end; Iโ€™ll have a look into it.

2 Likes

How does this work? I tried using FindOne method but it returns nil always.
my json table is structured like this

{
    "playername":{
        "coins": 00
    }
}
1 Like

I came across a 404 error, and here is how to fix it!

So first make sure your Api id and key are filled in correctly. If it still gives you a 404 error, do the following steps.

  1. Go to mongodbโ€™s data API section.
  2. Copy the URL endpoint (fully)
  3. Go into the Rongo module

What youโ€™ll see in the first few lines:

local APIVersion = "v1"
local URI = "https://data.mongodb-api.com/app/%s/endpoint/data/".. APIVersion

Now change URI to what you coppied, lets say my ID = โ€˜data_abcdefโ€™

local APIVersion = "v1"
local URI = "https://eu-central-1.aws.data.mongodb-api.com/app/data_abcdef/endpoint/data/v1"

now the final step is to change your ID to โ€œ%sโ€ and remove the version from the URI to keep stuff organized.

local APIVersion = "v1"
local URI = "https://eu-central-1.aws.data.mongodb-api.com/app/%s/endpoint/data/".. APIVersion

Hope this helps you @weakslayer3000 and all the others who will read this :slight_smile:

3 Likes

I also keep getting the 404 error and unfortunately the above method didnโ€™t work for me. It was the exact same link that was already there.

1 Like

For me itโ€™s not working in studio either so it may be I did something wrong but I keep double checking and it looks right.

1 Like

uh guess i figured it out
i just replaced %s with the actual part of the link and it worked

2 Likes