JSPM

express-robots.txt

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44363
  • Score
    100M100P100Q153213F
  • License ISC

Express middleware to handle different robots.txt responses on different domains

Package Exports

  • express-robots.txt

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-robots.txt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

express-robots.txt

Express middleware to handle different robots.txt responses on different domains. The goal with this middleware, is to avoid search engine indexing of public dev/test/demo/staging-servers etc.

Install

Install with npm: npm install express-robots.txt --save

Setup

robotsTxt(allowedDomains[, allowedText] [, disallowedText]);

Defaults

allowedText defaults to:

User-agent: *
Disallow:

disallowedText defaults to:

User-agent: *
Disallow: /

Usage:

var robotsTxt        = require('enxpress-robots.txt');
var robotsTxtHandler = robotsTxt(['domain.com', 'www.domain.com']);

app.use(robotsTxtHandler);