Update JavaScript examples to latest Railway (#14)

* update serverless pg example
* update nextjs example
* update prisma example
This commit is contained in:
Jake Runzer
2020-10-07 13:17:31 -06:00
committed by GitHub
parent 095a3e6de7
commit 07b4eb1e20
8 changed files with 56 additions and 2700 deletions

View File

@@ -13,7 +13,7 @@
},
"dependencies": {
"global": "^4.4.0",
"railway": "^2.0.5",
"pg": "^8.4.0",
"tslib": "^2.0.0"
}
}

View File

@@ -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