You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

dar-server

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dar-server

Filesystem backend for document archive


Version published
Maintainers
3
Created

Readme

Source

Dar Server

Node.js based filesystem backend for document archives (Dar). You can find examples here.

Install

$ git clone https://github.com/substance/dar-server.git
$ cd dar-server
$ npm install

Integration into a custom Express application

let express = require('express')
let darServer = require('dar-server')
let path = require('path')

const port = 4000
const rootDir = path.resolve(path.join(__dirname, 'archives'))

let app = express()
darServer.serve(app, {
  port,
  serverUrl: 'http://localhost:' + port,
  rootDir
})

app.listen(port, () => {
  console.log(`Running dar-server on port ${port}`)
})

To avoid name clashes with your own express end-points you can provide an apiUrl

darServer.serve(app, {
  port,
  serverUrl: 'http://localhost:' + port,
  rootDir,
  apiUrl: '/archives'
})

Command-line tool

This module comes with a command-line tool that starts dar-server in a new express instance.

$ npm install -g dar-server
$ dar-server ./my-archives
DAR server is running on http://localhost:4100

To start you could take the examples from the DAR repository:

git clone https://github.com/substance/dar.git

and then start the dar-server using

dar-server ./dar/examples

After that you should be able to open

http://localhost:4100/!list

in the browser and see a listing of found archives. Notice, that dar-server is just a backend for serving archives. To be able to read and edit the context you need to use Texture.

FAQs

Package last updated on 12 Sep 2018

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc