Socket
Book a DemoInstallSign in
Socket

mock-file-server

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-file-server

BetaJS Mock File Server for Testing

0.1.17
latest
Source
npmnpm
Version published
Weekly downloads
122
-9.63%
Maintainers
1
Weekly downloads
 
Created
Source

mock-file-server 0.1.16

Code Climate NPM

BetaJS Mock File Server for Testing

Getting Started

This a mock file server for testing uploading and retrieving files.

Files are stored in the memory of the server for a short time and are then removed.

npm install mock-file-server

You can then run the server as follows:

node node_modules/mock-file-server/server.js

You can also run it as a grunt task.

Basic Usage

The server creates the following endpoints:

  • GET /files/:filename/size: returns the size of an uploaded file as json {"size": size}`
  • GET /files/:filename: returns an uploaded file as binary stream
  • POST /files/:filename: stores an uploaded single file with field name file
  • POST /chunk/:filename: stores a single chunk with field name file with the chunk number being present in the request body
  • POST /assemble/:filename: assembles a chunked file, checking the total size with the total size being present in the request body
ResourceURL
Homepagehttps://github.com/betajs/mock-file-server
Gitgit://github.com/betajs/mock-file-server.git
Repositoryhttps://github.com/betajs/mock-file-server
Bloghttp://blog.betajs.com
Twitterhttp://twitter.com/thebetajs

Compatability

TargetVersions
NodeJS0.10 - Latest

Main Contributors

  • Oliver Friedmann

License

Apache-2.0

Keywords

gruntplugin

FAQs

Package last updated on 12 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.