1.0.3 • Published 7 years ago
madbet-static v1.0.3
Introduction
A Madbet middleware that serves static files from a specified directory (Madbet is a super-lightweight TypeScript middleware server framework for Node.js, based on the built-in http
module).
Installation
npm install --save madbet-static madbet
Usage
import { Madbet } from 'madbet'
import { MadbetStatic } from 'madbet-static'
const app = new Madbet()
app.use(new MadbetStatic('./public/'))
// more middlewares can go here using app.use()
app.start().listen(80)
Public API
// MadbetMiddleware is from the 'madbet-middleware' module
class MadbetStatic extends MadbetMiddleware {
// baseDir is the path of root directory to be served
constructor(baseDir?: String)
}
Credits
Kaleab S. Melkie (kaleabmelkie@gmail.com)
License
MIT License Copyright (c) 2017, Kaleab S. Melkie. All rights reserved.