socialtree/src/index.js

16 lines
332 B
JavaScript
Raw Normal View History

2022-10-13 14:59:02 +01:00
import express from 'express'
const app = express()
const port = 3000
const engine = 'ejs'
2022-10-13 14:59:02 +01:00
app.set('view engine', engine)
app.set('views', './src/views')
app.get('/', (req, res) => {
2022-10-13 20:37:37 +01:00
res.render('index', {
engine
2022-10-13 20:37:37 +01:00
})
2022-10-13 14:59:02 +01:00
})
app.listen(port, () => console.log(`App running on port ${port}, with view engine ${engine}`))