Working backend setup with endpoints and database setup for adventures.

This commit is contained in:
2019-02-18 22:42:52 +01:00
parent ba1070d5b2
commit cfd0b88987
26 changed files with 3083 additions and 0 deletions

14
server.js Normal file
View 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()
})