16 lines
338 B
JavaScript
16 lines
338 B
JavaScript
import express from "express";
|
|
const app = express()
|
|
const port = process.env.port || 3000;
|
|
|
|
app.use('/static', express.static('./static'),)
|
|
|
|
app.set('view engine', 'ejs');
|
|
app.set('views', './views');
|
|
|
|
app.get('/', (req, res) => {
|
|
res.render('index');
|
|
})
|
|
|
|
app.listen(port, () => {
|
|
console.log(`App listening on port ${port}`)
|
|
})
|