mirror of
https://github.com/KevinMidboe/leifsbackend.git
synced 2025-10-29 17:50:20 +00:00
Working backend setup with endpoints and database setup for adventures.
This commit is contained in:
14
server.js
Normal file
14
server.js
Normal file
@@ -0,0 +1,14 @@
|
||||
require('dotenv').config()
|
||||
|
||||
// console.log(process.env)
|
||||
|
||||
const { Client } = require('pg')
|
||||
const client = new Client()
|
||||
|
||||
client.connect()
|
||||
|
||||
client.query('SELECT $1::text as message', ['Hello world!'], (err, res) => {
|
||||
console.log(res.rows[0].message) // Yello world!
|
||||
client.end()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user