fastify-dayjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

fastify-dayjs

Fastify plugin to add dayjs support

Usage/Examples

import path from 'path'
import fastify from 'fastify'
import fastifyDayjs from 'fastify-dayjs'

const app = fastify()
app.register(fastifyDayjs)

app.get('/', () => {
  return app.dayjs().format()
})

app.listen({ port: 8000 }, (err, address) => {
  if (err) throw err
  console.log(`server running on ${address}`)
})

API Reference

Read more at https://day.js.org/

Package Sidebar

Install

npm i fastify-dayjs

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

7.14 kB

Total Files

8

Last publish

Collaborators

  • erwinstone