Answers for "node express project"

49

express js basic example

//to run : node filename.js
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))

//visit localhost:3000
// assuming you have done 1) npm init 2) npm install express
Posted by: Guest on July-17-2020
1

generate express js project

npm i express -g

express --view=pug myapp
Posted by: Guest on October-08-2021
2

initialize express app

npx express-generator
Posted by: Guest on August-15-2020
1

node express setup

yarn add express 
yarn add --dev @types/express
Posted by: Guest on March-30-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language