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

1.0.1 • Public • Published

fastify-uuid

A module for Fastify to Generate RFC-compliant UUIDs

Usage/Examples

import fastify from 'fastify'
import fastifyUUID from 'fastify-uuid'

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

app.get('/', () => {
  return app.uuid.v4()
})

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

API Reference

Read more at https://github.com/uuidjs/uuid

Package Sidebar

Install

npm i fastify-uuid

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

3.07 kB

Total Files

8

Last publish

Collaborators

  • erwinstone