1.0.4 • Published 6 years ago

@hke/ms-fileservice v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

@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

  • Add nconf
  • Add authentication
  • Add proper documentation
  • Add other tests than postman