Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

README.md

Outline

Fastify Postgres CRUD

Motivation, this simple app is meant to show on how to use Postgres alongside with Fastify, and to show how to achieve 100% test coverage with it.

Requirements

  • Docker & Docker Compose
  • Node.js

How to run?

With npm

$ npm start:db // start postgres db with docker
$ npm install
$ npm start

# testing
$ npm test

With docker compose

# migration up
$ docker-compose -f docker-compose.yaml -f compose-file/migration-up.yaml --exit-code-from fastify_postgres

# run the app
$ docker-compose up

# testing
$ docker-compose -f docker-compose.yaml -f compose-file/test.yaml --exit-code-from fastify_postgres

# migration down
$ docker-compose -f docker-compose.yaml -f compose-file/migration-up.yaml --exit-code-from fastify_postgres

Morty Proxy This is a proxified and sanitized view of the page, visit original site.