Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidystephenson/ae50175f267ca151ade0870aa1393fa7 to your computer and use it in GitHub Desktop.
Save davidystephenson/ae50175f267ca151ade0870aa1393fa7 to your computer and use it in GitHub Desktop.
// https://nodejs.org:80/en
// Protocol (http://) - Language
// Domain (nodejs.org) - Computer
// Port (:80) - Program
// Path (/en) - Files/Folders? Custom Section/Command
// import http from 'http'
const http = require('http')
const server = http.createServer((request, response) => {
console.log('new user connected')
response.end('<button>Hello, class!!!</button>')
})
const port = 3000
server.listen(port, () => {
console.log('Listening on:', port)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment