Socket
Book a DemoInstallSign in
Socket

restbox

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restbox

REST for CRUD file operations on dropbox

4.0.1
latest
Source
npmnpm
Version published
Weekly downloads
139
52.75%
Maintainers
1
Weekly downloads
 
Created
Source

Restbox License NPM version [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] Build Status Coverage

REST for CRUD file operations on dropbox.

What is it?

REpresentational State Transfer is an abstraction of the architecture of the World Wide Web.

Create Read Update Delete is 4 basic functions of persistent storage.

Install

npm i restbox

REST

NameMethodQueryBodyDescription
fsGETget file or dir content
sortsort dir content by name,
size, or time
orderorder of sorting, can be:
asc or desc
rawget file or raw dir content
sizeget file or dir size
timeget time of file change
hashget file hash
PUTfile contentcreate/write file
unzipfile contentunzip and create/write file
dircreate dir
PATCHdiffpatch file
DELETEdelete file
filesArray of namesdelete files

How to use?

const restbox = require('restbox');
const http = require('http');
const express = require('express');

const app = express();
const server = http.createServer(app);

const port = 1337;
const ip = '0.0.0.0';

app.use(restbox({
    token: 'your dropbox token',
    prefix: '/dropbox', // default
    root: '/', // default, can be string or function
}));

app.use(express.static(__dirname));

server.listen(port, ip);

License

MIT

Keywords

rest

FAQs

Package last updated on 16 Mar 2024

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.