Socket
Socket
Sign inDemoInstall

ledger-rest

Package Overview
Dependencies
58
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ledger-rest

REST web service API to access ledger cli data.


Version published
Weekly downloads
3
Maintainers
1
Install size
13.7 MB
Created
Weekly downloads
 

Readme

Source

ledger-rest

REST web service API to access the Ledger command-line interface (ledger-cli.org).

Ledger is a powerful, double-entry accounting system that is accessed from the UNIX command-line.

MIT License

Dependencies

Installing Ledger

The simplest way to install Ledger 3 is through Homebrew.

brew install ledger --HEAD

The --HEAD option is required to install version 3.x.

Usage

Install ledger-rest and its dependencies with npm.

npm install ledger-rest

Use the LedgerRest class to create a new RESTful server and start listening on a given port.

var LedgerRest = require('ledger-rest').LedgerRest;

var server = new LedgerRest({ file: 'path/to/ledger/journal/file.dat' });

server.listen(3000);

Or use the command line runner to start a server listening on the given port and serving a single Ledger .dat file.

npm install ledger-rest -g
	
ledger-rest -p <port> -f path/to/ledger/journal/file.dat

To confirm the server is listening:

curl -H "Content-Type: application/json" http://localhost:<port>/version
    
{"version":"3.1.1-20160111"}

The following endpoints are available:

  • /version
  • /balance
  • /register

Keywords

FAQs

Last updated on 01 Mar 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc