{"library":"nomine","title":"Nomine: Express Middleware for File Renaming","description":"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.","language":"javascript","status":"active","last_verified":"Thu Apr 23","install":{"commands":["npm install nomine"],"cli":null},"imports":["const nomine = require('nomine');","app.use(nomine({ prefix: '/rename' }));"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const express = require('express');\nconst nomine = require('nomine');\nconst app = express();\n\n// Use nomine middleware with a custom prefix\napp.use(nomine({\n    prefix: '/files/rename' // default is '/rename'\n}));\n\napp.listen(3000, function () {\n    console.log('Nomine example app listening on port 3000!');\n    console.log('Send PUT requests to http://localhost:3000/files/rename');\n    console.log('Example curl: curl -X PUT -H \"Content-Type: application/json\" -d \\'{\"dir\":\"/tmp\",\"from\":[\"oldfile.txt\"], \"to\": [\"newfile.txt\"]}\\' http://localhost:3000/files/rename');\n});","lang":"javascript","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}