0.2.12 • Published 3 years ago
hangersteak v0.2.12
Hangersteak
Node web static files server with built in compression support.
INSTALL
npm i hangersteak
USAGE
Vanilla NodeJS server. Will return 404 if not found, or the file using streams and correct mime type. Supports automatic 304 last modified headers.
const http = require('http')
const hangersteak = require('hangersteak')
const server = http.createServer((req, res) => {
// Using default options
hangersteak(req, res)
// With options, default values shown
hangersteak(req, res, {
dir: '', // Start with '/' to use absolute path
maxAge: 3600,
indexFile: 'index.html',
compress: false
})
})
server.listen(3000)
MIT licensed. Enjoy!
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
4 years ago
0.2.9
4 years ago
0.2.8
4 years ago
0.2.7
4 years ago
0.2.6
4 years ago
0.2.5
4 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.2
5 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago