@hke/ms-fileservice

1.0.4 • Public • Published

@hke/ms-fileservice

npm version Build Status Maintainability Test Coverage

REST Fileservice with versioning and parallel datatypes

Routes

GET http://localhost:3300/info // shows version, uptime, server timestamp
GET http://localhost:3300/ // shows all files
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738 // shows one file
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/detail // shows all versions and types for one file
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/download // downloads file
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/download/1 // downloads version 1 default type of file
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/download/pdf // downloads latest version type pdf of file
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/download/pdf/1 // downloads downloads type pdf version 1 of file
GET http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/download/1/pdf // downloads downloads type pdf version 1 of file

POST http://localhost:3300/ // adds new file
POST http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738 // adds new version of file
POST http://localhost:3300/c16512c0-5842-4aa0-9579-4f4ba15c8738/true // adds parallel type to latest version

Todo

  • [x] Add nconf
  • [ ] Add authentication
  • [ ] Add proper documentation
  • [x] Add other tests than postman

Readme

Keywords

none

Package Sidebar

Install

npm i @hke/ms-fileservice

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

57.8 kB

Total Files

24

Last publish

Collaborators

  • heiko87