
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
convexpress
Advanced tools
Employ conventions to register express routes. This is done by creating route definition objects - convroutes - which:
npm install --save convexpress
Note: this library requires nodejs >= 8
/* File: src/api/pets/get.js */
// Assuming NODE_PATH=src
const dbClient = require("services/db");
exports.path = "/pets";
exports.method = "get";
exports.description = "List pets";
exports.tags = ["pets"];
exports.responses = {
"200": {
description: "pets list"
}
};
exports.parameters = [
{
name: "status",
description: "Filter by pet status (e.g. available / not available)",
in: "query",
required: false,
type: "string"
}
];
exports.handler = async (req, res) => {
const pets = await dbClient.query(`SELECT * FROM pets WHERE status = $1`, [
req.query.status
]);
res.status(200).send(pets);
};
/* File: src/server.js */
const express = require("express");
const convexpress = require("convexpress");
const options = {
info: {
title: "pet store",
version: "1.0.0"
},
host: "localhost:3000"
};
const api = convexpress(options)
// Serve the API's swagger definition at /swagger.json
.serveSwagger()
// Register the route (assuming NODE_PATH=src)
.convroute(require("api/pets/get"))
// Or register multiple routes at once
.loadFrom(`${__dirname}/api/**/*.js`);
const server = express()
.use(api)
.listen(process.env.PORT);
Create an express router object (convrouter), which the additional methods
convroute, serveSwagger, and loadFrom.
options object: top-level properties of the swagger definition
The express router (convrouter).
Registers a convroute.
convroute object required: a convroute definition object:
path string requiredmethod string requiredhandler function _required__paramters Array< object >middleware Array< function >description stringtags Array< string >responses Map< object >The convrouter, to allow for method chaining.
Registers the route GET /swagger.json for serving the swagger definition, and
the route GET /swagger/ for serving the swagger UI html.
None.
The convrouter, to allow for method chaining.
Loads and registers convroutes from files matching the specified pattern.
pattern string required:
glob pattern of files to load
convroutes fromThe convrouter, to allow for method chaining.
See CONTRIBUTING.md.
FAQs
Employ conventions to register express routes
The npm package convexpress receives a total of 35 weekly downloads. As such, convexpress popularity was classified as not popular.
We found that convexpress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.