setting up html interface

master
Matt Huntington 2 years ago
parent 63217a4dd9
commit 233d8a4e7f

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>Outcomes Tracker</h1>
<p>See how instances did in comparisson to others</p>
</body>
</html>

@ -5,6 +5,8 @@ const client = new pg.Client({
database:"outcomes_tracker" database:"outcomes_tracker"
}) })
app.use(express.static('public'))
app.get('/instances', async (req, res)=>{ app.get('/instances', async (req, res)=>{
const instances = await client.query('SELECT * FROM instances'); const instances = await client.query('SELECT * FROM instances');
res.json(instances.rows); res.json(instances.rows);

Loading…
Cancel
Save