ReplDBService | Repl.it Database Integration

Based off of FirebaseService

I really just made this so you can sync your Replit projects with your ROBLOX projects, which actually seems kinda useful for moderation bots. I’ve already tried using an express project for a mod panel and it works!

How to use

  • Open a replit project.
  • Go to the shell (wait for the Nix Environment to load)
  • Execute the command: echo $REPLIT_DB_URL
  • Click on the URL
  • Copy the tab’s url
  • Put this into your script:
local RDBS = require(path.to.your.file)
local db = RDBS.new("database url, keep this very secret!")

-- Examples

db:GetKey("messageoftheday", true) -- returns "HELLO REPL"
db:GetKey("messageoftheday") -- returns HELLO REPL

db:SetKey("messageoftheday", "testing!") -- true (success?)

db:DeleteKey("messageoftheday") -- true

-- Multiple Keys
db:DeleteMultipleKeys({"key1", "key2"})
db:SetMultiple({["key1"] = "dog", ["key2"] = "cat"})

Installation

Head to the Github (more updated installation instructions)


Github: GitHub - doqedev/repldbservice

2 Likes

Can you give some examples on when somebody may want to use this?

2 Likes

I originally made this for a global ban moderation panel (website and ingame) and wanted to share it with everyone.

Here’s a ban panel made with HTML and works with fetch and Express
image