Skip to content

drivly/edge-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edge-api

Latest version on npm Downloads on npm Project license

Simplified Edge API Router with JWT Auth, Logging, and Database.

import { API, error } from 'edge-api'

const api = API()

api
  // .all('*', withUser, withDB({ database: 'API' }))
  .get('/', () => ({ hello: 'api' }))
  .get('/:resource', ({ resource }) => ({ resource }))
  .get('/:resource/:id+', ({ resource, id }) => ({ resource, id }))
  .all('*', () => error(404))

export default api

About

Simplified Edge API Router with JWT Auth, Logging, and Database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published