
* feat: perform pending migrations in start command * feat: log error when DB connection is refused * feat: log error when Redis connection is refused * refactor: fix type errors * fix: correct server and copy graphql schema * fix: differentiate migrations by env * chore: remove dev executable * chore: fix typo in default postgresUsername * fix: copy json files into dist folder * chore(cli): add dev script * chore: pull non-dev logs to info level * feat(cli): run app in start command * fix(backend): remove default count in Connection * fix(cli): remove .eslintrc usage in lint script * refactor: remove disableMigrationsListValidation * refactor: make Step optional in ExecutionStep * refactor: make Flow optional in Step
27 lines
643 B
TypeScript
27 lines
643 B
TypeScript
import appConfig from './src/config/app';
|
|
|
|
const fileExtension = appConfig.isDev ? 'ts' : 'js';
|
|
|
|
const knexConfig = {
|
|
client: 'pg',
|
|
connection: {
|
|
host: appConfig.postgresHost,
|
|
port: appConfig.postgresPort,
|
|
user: appConfig.postgresUsername,
|
|
password: appConfig.postgresPassword,
|
|
database: appConfig.postgresDatabase,
|
|
ssl: appConfig.postgresEnableSsl
|
|
},
|
|
pool: { min: 0, max: 20 },
|
|
migrations: {
|
|
directory: __dirname + '/src/db/migrations',
|
|
extension: fileExtension,
|
|
loadExtensions: [`.${fileExtension}`],
|
|
},
|
|
seeds: {
|
|
directory: __dirname + '/src/db/seeds',
|
|
}
|
|
}
|
|
|
|
export default knexConfig;
|