Skip to content

🍰A minimal Express which implements server, router and middleware.

License

Notifications You must be signed in to change notification settings

ihaichao/mini-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini-express

A minimal Express which implements server, router and middleware.
It can be used just like the code below.

const express = require('../index')
const app = express()

app.use((req, res, next) => {
  console.log('this is middleware1')
  next()
})

app.use((req, res, next) => {
  console.log('this is middleware2')
  next()
})

app.get('/', function(req, res) {
  res.end('hello express')
})

app.listen(3000, function (req, res) {
  console.log('server is listening port 3000')
})

About

🍰A minimal Express which implements server, router and middleware.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published