Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/netzo/database/plugin.ts>database

Deno-powered framework for building business web apps
Go to Latest
variable database
import { database } from "https://deno.land/x/netzo@0.4.11/database/plugin.ts";

A fresh plugin that registers middleware and handlers to to mount RESTful API routes on the /db route path.

A fresh plugin that creates handlers for the following routes:

  • GET /db?$prefix=<PREFIX> find all records matching query
  • GET /db?$key=<KEY> get an entry by key
  • POST /db?$prefix=<PREFIX> create a new entry (auto-generates id)
  • PUT /db?$key=<KEY> update an entry by key
  • PATCH /db?$key=<KEY> patch an entry by key
  • DELETE /db?$key=<KEY> remove an entry by key

type

(options?: DatabaseConfig) => Plugin