Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'
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'