fastify-postgresjs
Fastify PostgreSQL connection plugin, based on postgres.
Install
npm i postgres fastify-postgresjs --save
Usage
Add it to you project with register
and you are done!
This plugin will add the sql
namespace in your Fastify instance.
Example:
const fastify = ; fastify; fastify; fastify;
Development and Testing
First, start postgres with:
$ docker run --rm -d -p 5432:5432 --name fastify-postgresjs postgres:11-alpine
$ npm test