filesharing/server.js

12 lines
326 B
JavaScript

const express = require('express')
const app = express()
app.set('view engine', 'pug')
app.get('/', (req, res) => {
res.render('index', { title: 'hello, world!' })
})
const host = 'localhost'
const port = 3000
const server = app.listen(port, host, () => {
console.log(`server is running at http://${host}:${port}`)
})