0.1.2 • Published 7 years ago

@nicolasparada/static-middleware v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

@nicolasparada/static-middleware npm version dependencies

Middleware to serve static content.

Usage

const framework = require('@nicolasparada/web-framework')
const static = require('@nicolasparada/static-middleware')
const path = require('path')

const middlewares = [
  static.serve(path.join(__dirname, 'dist')),
  static.fallback(path.join(__dirname, 'dist', 'index.html'))
]

const app = framework(middlewares)

app.listen(80, '127.0.0.1', () => {
  console.log('Server running at http://localhost/ 🚀')
})
0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago