Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

express hello world

//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
Comment

PREVIOUS NEXT
Code Example
Javascript :: browser detection 
Javascript :: perform a function on each element of array javascript 
Javascript :: reactjs framer motion 
Javascript :: remove trailing zeros javascript 
Javascript :: paragraph antd 
Javascript :: arrow functions 
Javascript :: array map 
Javascript :: path module js 
Javascript :: settimeout method 
Javascript :: javascript add element to serialized form array 
Javascript :: mongoose bulk create 
Javascript :: jquery add class except this 
Javascript :: return nothing javascript 
Javascript :: for of javascript 
Javascript :: javascript regex match character from a set of characters 
Javascript :: pop array 
Javascript :: date without seconds react 
Javascript :: get role id from role position 
Javascript :: how to read files in node 
Javascript :: javascript filter array match includes exact 
Javascript :: spread operator javascript 
Javascript :: uppercase first letter js 
Javascript :: javascript time of execution 
Javascript :: days between two dates 
Javascript :: toast 
Javascript :: import url from json angular 
Javascript :: JavaScript BLOCK ENTER 
Javascript :: react icon import 
Javascript :: js check null 
Javascript :: how to find max number in array javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =