Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/core/plugins/api/mod.ts>api

Deno-powered framework for building business web apps
Go to Latest
variable api
import { api } from "https://deno.land/x/netzo@0.3.91/core/plugins/api/mod.ts";

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

A fresh plugin that creates handlers for the following routes:

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

type

(options?: ApiConfig) => Plugin