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.
16 lines
362 B
16 lines
362 B
const express = require('express');
|
|
const app = express();
|
|
const postgres = require('./postgres.js');
|
|
|
|
app.use(express.json());
|
|
app.use(express.static('public'))
|
|
|
|
const peopleController = require('./controllers/people.js');
|
|
app.use('/people', peopleController);
|
|
|
|
postgres.connect();
|
|
|
|
app.listen(process.env.PORT || 3000, () => {
|
|
console.log('listening');
|
|
})
|