npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

nomine

4.0.0 • Public • Published

Nomine License NPM version Dependency Status Build Status Coverage Status

File rename as express middleware.

Install

npm i nomine --save

API

const express = require('express');
const app = express();
 
app.use(nomine({
    prefix: '/rename' // default
});
 
app.listen(3000, function () {
    console.log('Example app listening on port 3000!');
});

Usage Example

After starting web-server with used nomine middleware it waits for payload sended on /rename url (by default). Payload could look this way:

{
    "dir": "/",
    "from": [
        "bin"
    ],
    "to": [
        "bin2"
    ]
}
$ curl -X PUT -d '{"dir":"/","from":["bin"], "to": ["bin2"]}' http://localhost:3000/rename
EACCES: permission denied, rename '/bin' -> '/bin2'

Related

  • Renamify - rename group of files from a directory

License

MIT

install

npm i nomine

Downloadsweekly downloads

857

version

4.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability