filesharing/server.js

12 lines
326 B
JavaScript
Raw Normal View History

2022-08-25 06:34:16 +00:00
const express = require('express')
const app = express()
2022-08-25 06:43:38 +00:00
app.set('view engine', 'pug')
2022-08-25 06:34:16 +00:00
app.get('/', (req, res) => {
2022-08-25 06:43:38 +00:00
res.render('index', { title: 'hello, world!' })
2022-08-25 06:34:16 +00:00
})
const host = 'localhost'
const port = 3000
const server = app.listen(port, host, () => {
console.log(`server is running at http://${host}:${port}`)
})