Express/Connect middleware to handle trailing slashes with options.
Why another remove trailing slash middleware? Because we wanted options. Like leaving the slash when serving the index file of a directory and custom index file names, etc!
npm install slashify --save
var express = ;var slashify = ;var app = ;app;app;
root- the root directory. This is mostly used when you have a directory handling turned on and/or have custom index file names. Defaults to
index- the name of the directory index file. Defaults to
directory- set whether or not you want slashify to leave the trailing slash when serving the index file of a directory. Defaults to
true. Set to
falseto remove the trailing slash for all paths.
npm install npm test