Answers for "express server port"

6

require express server.js

const express = require('express')const app = express() app.get('/', function (req, res) {  res.send('Hello World')}) app.listen(3000)
Posted by: Guest on March-19-2020
-1

express get port from request

const proxyHost = req.headers["x-forwarded-host"];
const host ? proxyHost : req.headers.host;
Posted by: Guest on December-24-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language