2
0
Fork 0

Make js work agian

This commit is contained in:
Willem 2017-12-23 22:45:27 +01:00
parent 63a761bbc0
commit 3f929f9607
16 changed files with 4258 additions and 130 deletions

View file

@ -1,4 +1,4 @@
var pgDB = require('pg');
const { Pool } = require('pg');
var pgDBNamed = require('node-postgres-named');
module.exports = {
@ -8,8 +8,10 @@ module.exports = {
function load(tcrud) {
const pool = new Pool({connectionString: 'postgres://postgres:postgresql@localhost/moviedb'});
// Create backend with id and uri
tcrud.backend.database.loadPostgres('pg/moviedb','postgres://postgres:postgresql@localhost/moviedb',pgDB,pgDBNamed);
tcrud.backend.database.loadPostgres('pg/moviedb', pool, pgDBNamed);
}
function setup(tcrud,tcrudModel) {

View file

@ -1,4 +1,4 @@
var pgDB = require('pg');
const { Pool } = require('pg');
var pgDBNamed = require('node-postgres-named');
module.exports = {
@ -7,8 +7,10 @@ module.exports = {
};
function load(tcrud) {
const pool = new Pool({connectionString: 'postgres://postgres:postgresql@localhost/pagila'});
// Create backend with id and uri
tcrud.backend.database.loadPostgres('pg/pagila','postgres://postgres:postgresql@localhost/pagila',pgDB,pgDBNamed);
tcrud.backend.database.loadPostgres('pg/pagila',pool,pgDBNamed);
}
function setup(tcrud,tcrudModel) {