Skip to content

csokun/fastify-typescript-boilerplate

Repository files navigation

Configuration

https://www.fastify.io/docs/v3.0.x/TypeScript/ https://developer.okta.com/blog/2018/11/15/node-express-typescript

Bundle Features

PostgreSQL Integration

Enable PostgreSQL integration by updating the pgsql configuration properties in config.json.

{
    "pgsql": {
        "enabled": true,
        "database": "data-name",
        "port": 5432,
        "poolSize": 10,
        "ssl": true
    }
}

For security reason use ENV variables or secret.json to configure the following properties:

{
    "pgsql": {
        "user": "database-username",
        "password": "database-password",
        "host": "localhost",
    }
}

Or overwrite the configuration via ENV like:

app__pgsql__user=username \
app__pgsql__password=password \
npm start

Database migration

The boilerplate has postgres-migrations bundle.

Add your migration *.sql to priv/migrations using naming convention <TIMESTAMP>_<description>.sql.

npm run pgsql:migrate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •