aboutsummaryrefslogtreecommitdiff
path: root/src/db/initPostgresDB.ts
blob: eb979f45522c3920dd5f255ad650a62ff2b0314d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as Sequelize from 'sequelize';
const gres: Sequelize.Sequelize = new Sequelize(
	'postgres://admin:eprprJacR0hBpmWvs5IDJZTnjRAY2gM3tSm0b1af@localhost:5432/be4',
	{
		operatorsAliases : false
	}
);

gres.authenticate()
	.then(() => {
		// Connection has been established successfully.
	})
	.catch((err: Error) => {
		// Unable to connect to the database.
	});