Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

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()=>{constGitCommitDB=require("github-commits-database")constdb=newGitCommitDB()constuuid=awaitdb.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:

constGitCommitDB=require("github-commits-database")constdb=newGitCommitDB()constuuid=process.env.DATABASE_KEY// change if your generated uuid for your database is on a different process.env path.asyncfunctionmain(){// Save data to databaseawaitdb.save(uuid,{user: "John Doe",project: "john doe's project",status: "starts"})// Retrieve the current stateconstdata=awaitdb.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

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages