Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@regionhalland/simple-redirect-server

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@regionhalland/simple-redirect-server

A simple redirect server using the http library.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
3
Created
Source

simple-redirect-server

A simple redirect server used for redirecting old to new sites using a csv file. See example folder for more information.

Install

$ npm install @region-halland/simple-redirect-server

Usage

var srs = require('@region-halland/simple-redirect-server');

//Init server
srs.init({
    portListen: 1337, //HTTP server will listen on this port
    httpStatusCode: 301, //This will be the http code used for redirections
    csvFile: __dirname + "/redirects.csv" //Path to csv file used for redirections
});

Example

See example folder for an example.

Q&A

How should my .csv file be structured to work?

See the redirect.csv file inside example folder.

License

GPL-2.0 © Region Halland

Keywords

http

FAQs

Package last updated on 03 Oct 2018

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