Socket
Book a DemoInstallSign in
Socket

librarian-local-storage

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

librarian-local-storage

Local filesystem storage engine for LibrarianJS

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

Librarian Local Storage

Installation

$ npm install librarian-local-storage

Usage

var express = require( 'express' )
var librarian = require( 'librarian' )
var LocalStorage = require( 'librarian-local-storage' )
var storage = new LocalStorage({
  // Where are these images stored?
  files: '/uploads', // optional, defaults to $PWD/files
})

var app = express()
app.use( '/files', librarian({
    storageEngine: storage
}) )

app.listen( 8888, function(){
    console.log( 'app listening' )
})

Note

LocalStorage is the default storage engine used for librarian out of the box. If you do not specify otherwise, a directory called 'files' will be created and used in the the current working directory.

Note

LocalStorage will attempt to create the directory given, but will continue whether this succeeds or fails. If you need special permissions on this directory, ensure it is created ahead of time.

FAQs

Package last updated on 26 Jun 2015

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