Advertisement
depth1

nodejs server

Feb 14th, 2019
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const express = require('express')
  2. const app = express()
  3.  
  4. app.use(express.static('bin')); // Serving ./bin
  5.  
  6. app.get('/', function (req, res)
  7. {
  8.     res.send('Hello World!')
  9. })
  10.  
  11. app.listen(3000, function ()
  12. {
  13.     console.log('http://localhost:3000')
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement