restafary v13.0.4 provides RESTful CRUD operations for file management via HTTP methods (GET, PUT, PATCH, DELETE) on files and directories. It acts as Express middleware, supporting features like sorting, hashing, unzip on upload, and directory creation. Requires Node.js >=22 and depends on express. It is actively maintained with regular releases. Key differentiators: simple integration, raw file access, and diff-based patching.
npm install restafaryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up Express app with restafary middleware to serve files via REST API on /fs prefix.
Use import statements or dynamic import() instead of require()
Upgrade Node.js to version 22 or higher
Restrict root to a subdirectory or use a function to validate paths
Change to import { restafary } from 'restafary' or use dynamic import()Ensure app is created with express() before use
Upgrade Node.js to >=22 or transpile with Babel