Nomine is an Express.js middleware package that facilitates renaming files and folders through HTTP PUT requests. It provides a straightforward API to expose a file renaming endpoint within an Express application, which is typically used for administrative interfaces or content management systems that require remote file system manipulation. The current stable version is 4.0.0, which mandates Node.js version 10 or higher, continuing a pattern of dropping support for older Node.js versions in each major release. The package's release cadence is driven primarily by updates to its internal dependencies and adjustments to Node.js compatibility. Its main differentiator is its direct integration into the Express ecosystem, offering a pre-packaged solution for network-based file renaming operations, abstracting the underlying file system interactions by utilizing the `renamify` package for the core renaming logic.
npm install nomineVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes an Express server, integrates the `nomine` middleware, and listens on port 3000. It demonstrates how to configure a custom endpoint for rename operations and provides a `curl` example for testing.
Upgrade your Node.js environment to version 10 or higher before upgrading to nomine v4.0.0.
Upgrade your Node.js environment to version 8 or higher. For Node.js versions below 8, use nomine v2.x.
Upgrade your Node.js environment to version 4 or higher. For Node.js versions below 4, use nomine v1.x.
Always implement strong authentication (e.g., user sessions, API keys) and fine-grained authorization checks before using `nomine` in production. Restrict the `dir` parameter to only allow operations within designated user directories or safe zones.
Ensure the Node.js process has appropriate file system permissions for the directories and files it attempts to modify. Avoid attempting to rename system-critical directories like `/bin` on production servers. Use relative paths or explicitly designated user data directories.
Ensure `const nomine = require('nomine');` is at the top of your file and that `app.use(nomine({ /* options */ }));` is used, calling `nomine()` to get the middleware function.