1.1.0 • Published 3 years ago

happner-files v1.1.0

Weekly downloads
29
License
MIT
Repository
github
Last release
3 years ago

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.

1.1.0

3 years ago

1.0.0

7 years ago

0.1.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago