robots.txt
robots.txt middleware for express/connect to server up your robots.txt
Last updated 4 years ago by tomgco .
New BSD · Original npm · Tarball
$ cnpm install robots.txt 
SYNC missed versions from official npm registry.

Robots.txt

Pass in the location of your robots.txt file on the file system, and this module will return you a piece of Connect/Express middleware that will serve it at GET /robots.txt.

This makes one synchronous call to read the file upon start up, then reads it from memory for every request. If you gave the wrong path, you will know about it at startup. Cache headers are set for you.

Installation

npm install --save robots.txt

Usage

var robots = require('robots.txt')

// Pass in the absolute path to your robots.txt file
app.use(robots(__dirname + '/robots.txt'))

Credits

Built by Tom Gallacher and Ben Gourley

Licence

Licensed under the New BSD License

Maintainers (2)
Downloads
Today 0
This Week 5
This Month 11
Last Day 5
Last Week 6
Last Month 5
Dependencies (0)
None
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |