Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-rest-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-rest-api

An Express app for exposing the node filesystem as a simplified API

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Node Filesystem Rest API

This Express app exposes a simple API for proxying the nodejs filesystem. Doesn't allow any operations above the specified base directory. Warnings: Still in active development, API may change regularly. Not recommended for production servers.

Documentation

https://a-axton.github.io/fs-rest-api/

Installation
npm install fs-rest-api
Usage

This module uses an Express router so you can use it with your existing Express apps.

var express = require('express');
var app = express();
var fsAPI = require('fs-rest-api');
var path = require('path');

// set the routing prefix and base directory
app.use('/fs', fsAPI(path.join(__dirname, './test-dir')));
app.set('port', process.env.PORT || 3000);
var server = app.listen(app.get('port'), function() {
  console.log('Express server listening on port ' + server.address().port);
});

Allows the proper owner settings for creating directories. More here https://nodejs.org/api/process.html#process_process_umask_mask

process.umask(0);
TODO
  • Add tests
  • Modify middleware to work for Hapi, KOA, restify

FAQs

Package last updated on 02 Dec 2016

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc