Skip to content

luis-codex/lc-elysia-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lc-elysia-logger

Installation

bun add lc-elysia-logger

Usage

import { lcLogger } from 'lc-elysia-logger';
import { Elysia } from 'elysia';

const app = new Elysia()
  .use(lcLogger())
  .group('lc-elysia-logger', (api) =>
    api
      .get('/', () => ({ message: 'API' }))
      .post('/', () => ({ message: 'API' }))
      .put('/', () => ({ message: 'API' }))
      .delete('/', () => ({ message: 'API' }))
      .patch('/', () => ({ message: 'API' }))
      .options('/', () => ({ message: 'API' }))
      .head('/', () => ({ message: 'API' }))
  )  
  .listen(3000);

console.log(` - API is running at ${app.server?.hostname}:${app.server?.port}`);

Result

Result logger

Releases

No releases published

Packages

No packages published