Skip to content

void-service-point/github-commits-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-commits-database

Free unsafe database that uses git commit messages on randomly generated branches on a random repository. It's unsafe because anyone can see the content of your database if you search for it, but it's free with no limits.

Installation

github-commits-database is meant for Node.js use, so to access it, use an npm package:

npm install github-commits-database

Usage

First create a new database by running this code:

;(async () => {
const GitCommitDB = require("github-commits-database")
const db = new GitCommitDB()
const uuid = await db.createDatabase()
console.log(uuid) // outputs some uuid.
})()

Save the uuid outputted in the console to a .env file. Then you can use the database like below:

const GitCommitDB = require("github-commits-database")
const db = new GitCommitDB()

const uuid = process.env.DATABASE_KEY // change if your generated uuid for your database is on a different process.env path.

async function main() {
  // Save data to database
  await db.save(uuid, { 
    user: "John Doe", 
    project: "john doe's project", 
    status: "starts" 
  })

  // Retrieve the current state
  const data = await db.get(uuid)
  console.log("Current Data:", data)
}

main()

How It Works

When you call save(), github-commits-database uses the GitHub API to:

  • Fetch the latest commit SHA of the branch corresponding to your database.
  • Create a new commit pointing to the same tree as the parent (no files change).
  • Sets the message of the commit to the current database data.
  • Updates the branch refernce to point to this new commit.

About

free database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published