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 :: npm err! 503 service unavailable proxy 
Javascript :: run javascript from uri 
Javascript :: javascript after dom ready 
Javascript :: center horizontally react native 
Javascript :: express body-parser deprecated 
Javascript :: jquery in react 
Javascript :: Get Substring between two characters using javascript 
Javascript :: how replace 0 without replace 10 in js 
Javascript :: javascript reserved words 
Javascript :: node readFileSync json 
Javascript :: randomColor 
Javascript :: how to filter an array to only get numbers 
Javascript :: for loop display array 
Javascript :: moment get time am pm 
Javascript :: century from year javascript 
Javascript :: fs.writefile 
Javascript :: add set time out in jquery 
Javascript :: jest check buffer 
Javascript :: web3 check if contract 
Javascript :: ejs partial pass value 
Javascript :: nextauth dynamic redirect after login 
Javascript :: play a sound wiith js 
Javascript :: discord.js message on member add 
Javascript :: javascript how to push to an array while blindfolded 
Javascript :: string to accept two characters after point javascript 
Javascript :: how to hide mouse pointer in javascript 
Javascript :: linebreak eslint 
Javascript :: react how to scroll to element 
Javascript :: html to pdf node js background color 
Javascript :: adonisjs findorcreate 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =