happner-files

1.1.0 • Public • Published

happner-files

Happner file server.

Currently only supports uploads.

Configuration

In mesh config.

  ...
  components: {
    'happner-files': {
      // define a set of url to fs mappings
      // (first match wins)
      path: {
        routes: {
          '/match/url/path': '/store/here',
          '/': '/var/www'
        }
      },
      // define the happner web route to the upload handler
      web: {
        routes: {
          // http://host.name/happner-files/files
          files: 'handler'
        }
      }
    }
  },
  ...

An upload POST to /happner-files/files**/match/url/path**/filename
will be stored at /store/here/filename,
having matched the first path route.

An upload POST to /happner-files/files / kept/deeper/path/filename
will be stored at /var/www/kept/deeper/path/filename,
having matched the second path route.

Readme

Keywords

none

Package Sidebar

Install

npm i happner-files

Weekly Downloads

1,044

Version

1.1.0

License

MIT

Unpacked Size

20.3 kB

Total Files

13

Last publish

Collaborators

  • jeggers