Neverending Prototype Mode

    @nicolasparada/static-middleware

    0.1.2 • Public • Published

    @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/ 🚀')
    })

    Install

    npm i @nicolasparada/static-middleware

    DownloadsWeekly Downloads

    13

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • nicolasparada