Skip to Content
🍌 BananaDB 0.1.0 is here β€” spin up a JSON REST API in seconds!
🍌 Introduction

Introduction

bananaDB is a 🍌 lightweight JSON database and REST API mock server.
It turns a simple .json file into a live RESTful API with zero setup β€” ideal for prototyping, mocking, and testing front-end applications.

With one command:

npx bananadb --db db.json --port 4000

bananaDB will:

  • πŸš€ Spin up a REST server instantly using your JSON file as the database
  • πŸ”„ Expose CRUD routes (GET, POST, PATCH, DELETE) for each top-level array
  • πŸ†” Support custom IDs, auto-increment numbers, or random string IDs
  • πŸ‘€ Watch your file for changes and hot-reload routes automatically
  • 🌐 Enable CORS by default, making it front-end-friendly
  • 🎨 Print available endpoints in a clean, color-coded console view

Example

Given a db.json:

{ "users": [ { "id": 1, "name": "Alice" }, { "id": 2, "name": "Bob" } ], "posts": [] }

bananaDB generates routes like:

GET /users GET /users/1 POST /users PATCH /users/1 DELETE /users/1 GET /posts

Why bananaDB?

  • ⚑ Zero-config – no schemas, migrations, or servers to install
  • πŸ“ JSON-first – just edit your file and see instant changes
  • πŸ”§ Drop-in replacement for json-server with familiar flags (--db, --watch)
  • πŸ›  Perfect for front-end devs – mock APIs in seconds and focus on UI

πŸ‘‰ Next: Getting Started

Last updated on