How to use @build-tracker/plugin-with-postgres - 2 common examples

To help you get started, we’ve selected a few @build-tracker/plugin-with-postgres examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paularmstrong / build-tracker / config / postgres.js View on Github external
const withPostgres = require('@build-tracker/plugin-with-postgres').default;
const { BudgetLevel, BudgetType } = require('@build-tracker/types');

const { config } = require('dotenv');
config();

/**
 * To run a mysql docker container:
 * docker run --name pg -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=buildtracker -p 54320:5432 -d postgres
 * yarn ts-node src/server/src/index.ts setup -c ./config/postgres.js
 * yarn ts-node src/server/src/index.ts seed -c ./config/postgres.js
 */

module.exports = withPostgres({
  defaultBranch: 'master',
  dev: true,
  artifacts: {
    groups: [
      {
        name: 'Web App',
        artifactMatch: /^app\/client/,
        budgets: [{ level: BudgetLevel.ERROR, sizeKey: 'gzip', type: BudgetType.SIZE, maximum: 150000 }]
      }
    ]
  },
  pg: {
    connectionString: 'postgresql://postgres:mysecretpassword@127.0.0.1:54320/buildtracker',
    ssl: false
  },
  url: 'http://localhost:3000'
github paularmstrong / build-tracker / demo / build-tracker.config.js View on Github external
const withPostgres = require('@build-tracker/plugin-with-postgres').default;
const { BudgetLevel, BudgetType } = require('@build-tracker/types');

module.exports = withPostgres({
  artifacts: {
    groups: [
      {
        name: 'Web App',
        artifactMatch: /^app\/client/,
        budgets: [{ level: BudgetLevel.ERROR, sizeKey: 'gzip', type: BudgetType.SIZE, maximum: 150000 }]
      }
    ]
  },
  defaultBranch: 'next',
  pg: {
    connectionString: process.env.DATABASE_URL,
    ssl: true
  },
  port: process.env.PORT,
  url: 'https://build-tracker-demo.herokuapp.com'

@build-tracker/plugin-with-postgres

Build Tracker server plugin for PostgreSQL

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular @build-tracker/plugin-with-postgres functions

Similar packages