Skip to content

study-hex/node-daily

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-day11-express-stater


Notes

  1. new project

  2. Terminal

npm init -y
npm i express --save
  1. new app.js
const express = require('express');
const app = express();
  1. JS-port
const port = 3000;
app.listen((port), () => {
  console.log(`
    Listening on port::: ${port}
  `)
})
  1. JS-route
app.get('/', (req, res) => {
  res.send('Hello!')
})
  1. Terminal-run
node app.js
  1. visit
http://localhost:3000/
  1. Screenshot

Edit on StackBlitz ⚡️

Releases

No releases published

Packages

No packages published