Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Boilerplate node js server

// require packages used in the project
const express = require('express')
const app = express()
const port = 3000

// routes setting
app.get('/', (req, res) => {
  res.send('Hello World')
})

// start and listen on the Express server
app.listen(port, () => {
  console.log(`Express is listening on localhost:${port}`)
})
 
PREVIOUS NEXT
Tagged: #Boilerplate #node #js #server
ADD COMMENT
Topic
Name
1+6 =