Skip to content

AloisSeckar/nuxt-neon

Repository files navigation

Nuxt Neon

npm version npm downloads License Nuxt

nuxt-neon

Nuxt Neon is a Nuxt v4-compliant module allowing smooth integration with Neon database.

How to use?

Install the module to your Nuxt application with one command:

npx nuxi module add nuxt-neon

Provide connection details to your Neon DB instance through a set of Nuxt runtime config variables:

  • NUXT_NEON_HOST
  • NUXT_NEON_USER
  • NUXT_NEON_PASS
  • NUXT_NEON_DB

Nuxt Neon will construct a PostgreSQL connection string based on given values:

`postgresql://${NUXT_NEON_USER}:${NUXT_NEON_PASS}@${NUXT_NEON_HOST}.neon.tech/${NUXT[_PUBLIC]NEON_DB}`

Settings are used to initialize the Neon serverless driver object initialized on the Nuxt server.

NOTE: Sensitive connection data are sealed within the Nuxt server (Nitro). The only public property might be the database name (if you pick the public variant). On the other hand, this means you cannot use Nuxt Neon in static builds and deploy without JS runtime.

That's it! Your Nuxt app is now connected to a Neon database instance ✨

See the documentation for more info.

About

Nuxt module allowing smooth integration with Neon database

Topics

Resources

License

Contributing

Stars

Watchers

Forks