1.0.7 • Published 5 years ago
pusudb-use-static-file v1.0.7
pusudb-use-static-file
Middleware to serve static-files with the pusudb-framework.
This middleware adds a file-handler to the pusudb-framework to serve static files.
Framework: pusudb
Installing
npm install pusudb-use-static-file --save
Use
Define the path where the static-files are located. Define some url's which should be escaped. To define a url-prefix use the option prefix.
var Pusudb = require('pusudb')
var pusudb = new Pusudb(3000, 'localhost', { log : true })
var Static = require('pusudb-use-static-file')
// prefix '/css' : http://localhost:3000/css/main.css
var static = new Static(__dirname + '/node_modules/css', ['/db', /* blocked pathnames */], { prefix : '/css' })
//add the middleware to the pusudb
pusudb.use('http', static.serve)
pusudb.listen(function(port, host){
console.log('pusudb listening:', port, host)
})
Authors
- Yannick Grund - Initial work - yamigr
License
This project is licensed under the MIT License
1.0.7
5 years ago
1.0.6
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.0.22
5 years ago
0.0.21
5 years ago
0.0.20
5 years ago
0.0.19
5 years ago
0.0.18
5 years ago
0.0.17
5 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
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