Files
auth-template/server/db/index.js
Mikayla Dobson cfe4898ec9 server mounts
2023-01-31 17:34:32 -06:00

15 lines
303 B
JavaScript

const { Pool } = require("pg");
require('dotenv').config();
const constring = process.env.constring;
function main() {
if (!constring) {
throw new Error("Did not find connection string for database");
}
return new Pool({ connectionString: constring })
}
module.exports = main();