mirror of
https://github.com/SrIzan10/starters.git
synced 2026-05-01 11:05:16 +00:00
Update JavaScript examples to latest Railway (#14)
* update serverless pg example * update nextjs example * update prisma example
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"global": "^4.4.0",
|
||||
"railway": "^2.0.5",
|
||||
"pg": "^8.4.0",
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const pg = require("railway/pg");
|
||||
const pg = require("pg");
|
||||
const client = new pg.Pool();
|
||||
|
||||
pg.query("SELECT now()", (err, res) => {
|
||||
client.query("SELECT now()", (err, res) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
@@ -8,4 +9,4 @@ pg.query("SELECT now()", (err, res) => {
|
||||
console.log(res.rows);
|
||||
});
|
||||
|
||||
pg.close();
|
||||
client.close();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user