
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
mock-file-server
Advanced tools
BetaJS Mock File Server for Testing
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
.
The server creates the following endpoints:
: returns the size of an uploaded file as json
{"size": size}`/files/:filename
: returns an uploaded file as binary stream/files/:filename
: stores an uploaded single file with field name file
/chunk/:filename
: stores a single chunk with field name file
with the chunk number being present in the request body/assemble/:filename
: assembles a chunked file, checking the total size with the total size being present in the request bodyTarget | Versions |
---|---|
NodeJS | 0.10 - Latest |
Apache-2.0
FAQs
BetaJS Mock File Server for Testing
The npm package mock-file-server receives a total of 99 weekly downloads. As such, mock-file-server popularity was classified as not popular.
We found that mock-file-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.