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 :: hello world expressjs 
Javascript :: npm ERR! 503 Service Unavailable: npm@latest 
Javascript :: regular expression for indian mobile number 
Javascript :: fibonacci js code 
Javascript :: increase-memory-limit not working node 
Javascript :: datatable loading 
Javascript :: value from getelementbyid 
Javascript :: react app using npm 
Javascript :: how to open html file with javascript 
Javascript :: javascript keywords 
Javascript :: mui stack align verticaly center 
Javascript :: htaccess for react 
Javascript :: Codewars Beginner - Reduce but Grow 
Javascript :: javascript remove element 
Javascript :: javascript update url without reload 
Javascript :: javascript create text file 
Javascript :: truncate function react 
Javascript :: regex password validation 
Javascript :: get ckeditor textarea value in jquery 
Javascript :: javascript split by newline 
Javascript :: connecting to mongodb using mongoose 
Javascript :: apache angular routing 
Javascript :: can we use two versions of jquery in same page 
Javascript :: TypeError: this.jsonEnabled is not a function 
Javascript :: how to get the data attached with an element in javascript 
Javascript :: block enter key using jquery 
Javascript :: angular date input value 
Javascript :: javascript object to params string 
Javascript :: insertone mongoose 
Javascript :: add 2 microseconds to Date() js 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =