Skip to content

utf8pro/app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@utf8pro/app

API application library, based on Bun.

Installation

bun add @utf8pro/app

Example

import app, {AppError, type TContext} from "@utf8pro/app"

app()
  .use(async ({request, params}: TContext) => {
    const authHeader = request.headers.get("Authorization")
    if (!authHeader) {
      throw new AppError("Authorization header is missing", 401)
    }
  })
  .listen(3000)

About

API application library, based on Bun.

Topics

Resources

Stars

Watchers

Forks

Contributors