1.0.7 • Published 7 years ago

pusudb-use-static-file v1.0.7

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

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

7 years ago

1.0.6

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago