GithubHelp home page GithubHelp logo

nunogois / bun-kiwi Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 8 KB

Bun ๐Ÿฅ - A basic, performant key-value store made with the purpose of checking out Bun. Successor of https://github.com/nunogois/bun-kv-store.

TypeScript 100.00%
api-rest bun key-value-store typescript

bun-kiwi's Introduction

bun-kiwi

A basic, performant key-value store made with the purpose of checking out Bun. Successor of https://github.com/nunogois/bun-kv-store - Made originally in July 2022.

Includes a very basic custom router.

Could be useful as a simple REST API for a key-value store for stuff like hackathons.

This project was created using bun init in bun v1.0.0. Bun is a fast all-in-one JavaScript runtime.

Getting Started

To install dependencies:

bun install

To develop:

bun dev

To run:

bun start

Routes

  • GET /store/this/is/my/identifier (returns all data in the this/is/my/identifier key)
  • POST /store/this/is/my/identifier (stores data in the this/is/my/identifier key)
  • DELETE /store/this/is/my/identifier (deletes all data in the this/is/my/identifier key)

A common use-case could be POSTing a JSON with your app's current state, then retrieving it at anytime by GETting it with the same URL.

You could technically generate a random and secure key to store your data, like /store/my_app/MY_SECRET_KEY/users, but...

Even though you can delete the data you store at anytime, you should not store private or sensitive information in this store, unless you're hosting it yourself and know what you're doing.

Data in this store is solely the responsibility of its owners and can be lost at anytime.

Authentication

If you would like to enable authentication, you can create a tokens.txt file at the root of the project with a list of tokens to be used (one per line). You will need to send one of them as a Bearer token and each of them will use its own store.

bun-kiwi's People

Contributors

nunogois avatar

Stargazers

Jaron Wanderley avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.