Giter Club home page Giter Club logo

http-sip2's Introduction

http-sip2

A simple http wrapper for a sip2 client. Based on express and node-sip2 project (https://github.com/janosch12345/node-sip2).

The sip2 client bundles several sip2 connections into one connection and splits up incoming request to all underlying connections.

Warning

There is NO security build in this application. All routes are open to public and no authorization is done. Please secure the routes in order to restrict access only to certain clients to prevent the drop of personal data from your patrons. F.e. put the application behind a reverse proxy (apache or nginx running under https) and add at least a basic auth. In server js you can restrict incoming connections to certain IP addresses.

Installation

  • Run $ npm install to add all dependencies.
  • Rename _config.js to config.js and enter your sip2 configuration.
  • Testconnections from config.js are used when node is running in development mode.

A systemd service file is included in system/

Startup

node server.js

Routes

Not all sip requests are included as routes yet, but simple to be integrated when you are firm with the node-sip2 project.

Items

http://localhost:3000/sip3/itemInformation/:itemIdentifier

Patron

itemType is one of the following or "hold","overdue","charged","fine","recall","unavailable","fee" or left empty

http://localhost:3000/sip3/patronInformation/:patronIdentifier/:itemType?

Checkout

http://localhost:3000/sip3/checkout/:patronIdentifier/:itemIdentifier

Checkin

http://localhost:3000/sip3/checkin/:itemIdentifier

Renew

http://localhost:3000/sip3/renew/:patronIdentifier/:itemIdentifier

Middleware

It is possible to add a middleware in order to bundle certain sip2 requests in order to build complex responses e.g. return a patron account including all items.

An example called unidos is included and triggered via config.js. To enable it set unidos : true

http-sip2's People

Contributors

janosch12345 avatar bibliothekthwildau avatar dependabot[bot] avatar

Watchers

Arek avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.