New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

subdomain-static

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

subdomain-static

subdomain-static is a nodejs module help you redirect subdomain request to certain file folders

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

about

subdomain-static is a nodejs module help you redirect subdomain request to certain file folders

it's required to be used with express & serve-static

install

npm install subdomain-static 

how to use

  • in app.js
app.use(require('subdomain-static')({ folder: 'apps' }));
... // lines of code
app.use(express.static(path.join(__dirname, 'public')));
  • create a folder you want to redirect to in /public

options pass to subdomain-static

  • folder(required)- folder redirect to
  • exclude_subdomains {Array}- any subdomain you want subdomain-static ignore
  • hostname {String}- hostname you want subdomain-static to support, if domain not equal to hostname, then the request will be ignored by subdomain-static

Keywords

express

FAQs

Package last updated on 20 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts