You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
359 B
17 lines
359 B
const express = require('express');
|
|
const app = express();
|
|
const pg = require('pg');
|
|
const client = new pg.Client({
|
|
database:"outcomes_tracker"
|
|
})
|
|
|
|
app.use(express.static('public'))
|
|
|
|
app.get('/instances', async (req, res)=>{
|
|
const instances = await client.query('SELECT * FROM instances');
|
|
res.json(instances.rows);
|
|
})
|
|
|
|
client.connect();
|
|
app.listen(3000);
|