JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 102
  • Score
    100M100P100Q75830F
  • License MIT

file rename as express middleware

Package Exports

  • nomine

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nomine) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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'
  • Renamify - rename group of files from a directory

License

MIT