
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
clean-urls
Advanced tools
Express/Connect middleware to serve static files from cleaner, extensionless urls
Express/Connect middleware to serve static files from cleaner, extensionless urls.
Clean urls are only used for .html
files. Useful for sites like blogs that are generated from static site generators such as Jekyll.
npm install clean-urls --save
var express = require('express');
var cleanUrls = require('clean-urls');
var app = express();
app.use(cleanUrls());
app.listen(3000, function () {
});
options
root
- root directory of your static files. This is used to determine if the url maps a static file and to serve those static files.index
- name if the directory index file. Defaults to index.html
. This is used to redirect you to the directory url instead of the index url and to serve the index file if it is a directory url.npm install
npm test
FAQs
Express/Connect middleware to serve static files from cleaner, extensionless urls
The npm package clean-urls receives a total of 25 weekly downloads. As such, clean-urls popularity was classified as not popular.
We found that clean-urls demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.