2024-01-13 02:19:49 +01:00
|
|
|
// Importing the Knex library
|
|
|
|
import knex from 'knex';
|
|
|
|
import 'dotenv/config'
|
|
|
|
|
|
|
|
if (!process.env.DB_URL) {
|
|
|
|
fail("Ensure you set DB_URL");
|
|
|
|
};
|
|
|
|
|
|
|
|
// Creating an instance of Knex
|
2024-01-14 16:04:58 +01:00
|
|
|
export default knex({
|
2024-01-13 02:19:49 +01:00
|
|
|
client: 'postgres',
|
|
|
|
connection: process.env.DB_URL
|
|
|
|
});
|