Files
Avtex/scripts/create_db.cjs
T

14 lines
380 B
JavaScript

const { Pool } = require('pg');
async function test() {
try {
const pool = new Pool({ connectionString: `postgresql://postgres:postgres@localhost:5432/postgres` });
await pool.query('CREATE DATABASE "xflow"');
console.log('✅ SUCCESS created xflow');
process.exit(0);
} catch(e) {
console.log('❌ failed:', e.message);
process.exit(1);
}
}
test();