Answers for "express server js file"

2

use static with expres

app.use(express.static('directoryName'))
#store the files in the directory as if you were making a website without express
Posted by: Guest on August-12-2020
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

Code answers related to "Javascript"

Browse Popular Code Answers by Language