Make js work agian
This commit is contained in:
parent
63a761bbc0
commit
3f929f9607
16 changed files with 4258 additions and 130 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue