File tree Expand file tree Collapse file tree 6 files changed +6
-6
lines changed
with-postgres-sequelize/templates/src
with-postgres-typeorm/templates/src Expand file tree Collapse file tree 6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const user = process.env.MONGO_USER ?? '';
55const password = process . env . MONGO_PASSWORD ?? '' ;
66
77const config = {
8- uri :
8+ url :
99 user === '' || password === ''
1010 ? `mongodb://${ host } :${ port } /${ dbName } `
1111 : `mongodb://${ user } :${ password } @${ host } :${ port } /${ dbName } ` ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import config from '../config/mongo';
88// connect mongo
99const connect = async ( ) : Promise < void > => {
1010 try {
11- await mongoose . connect ( config . uri , {
11+ await mongoose . connect ( config . url , {
1212 useUnifiedTopology : true ,
1313 useNewUrlParser : true ,
1414 promiseLibrary : Promise ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const user = process.env.POSTGRES_USER ?? '';
55const password = process . env . POSTGRES_PASSWORD ?? '' ;
66
77const config = {
8- uri :
8+ url :
99 user === '' || password === ''
1010 ? `postgres://${ host } :${ port } /${ dbName } `
1111 : `postgres://${ user } :${ password } @${ host } :${ port } /${ dbName } ` ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import config from '../config/postgres';
66// import Thing from '../components/things/model';
77
88// create sequelize
9- const sequelize = new Sequelize ( config . uri ) ;
9+ const sequelize = new Sequelize ( config . url ) ;
1010
1111// connect postgres
1212const connect = async ( ) : Promise < void > => {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const user = process.env.POSTGRES_USER ?? '';
55const password = process . env . POSTGRES_PASSWORD ?? '' ;
66
77const config = {
8- uri :
8+ url :
99 user === '' || password === ''
1010 ? `postgres://${ host } :${ port } /${ dbName } `
1111 : `postgres://${ user } :${ password } @${ host } :${ port } /${ dbName } ` ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const connect = async (): Promise<void> => {
1010 try {
1111 await createConnection ( {
1212 type : 'postgres' ,
13- url : config . uri ,
13+ url : config . url ,
1414 // TODO: register models to connection
1515 // entities: [Thing],
1616 synchronize : true ,
You can’t perform that action at this time.
0 commit comments