Coder Social home page Coder Social logo

pnr-proxy's Introduction

#Sentia-pnr sentia-pnr is a simple client for cpr direkte developed by Sentia. Sentia-pnr can either be used as a node library, or a standalone proxy for cpr direkte.

disclaimer

Sentia accepts absolutely no responsibility for any use of this library.

node library

const pnr = require('sentia-pnr')
const client = pnr({
  logging: true,
  userID: <cpr direkte userID>,
  username: <cpr direkte username>,
  password: <cpr direkte password>,
  host: 'direkte.cpr.dk' // defaults to direkte-demo.cpr.dk
})

pnr('070861-4815')
  .then(console.log, console.error)

see the test-data folder for examples of the data format.

standalone proxy

you can also run sentia-pnr as a standalone proxy for cpr direkte

to run the proxy simply run :

yarn
yarn start

you need to set the following env vars before running the server:

CPR_USER_ID, CPR_USERNAME, CPR_PASSWORD, CPR_HOST, PORT

in addition you can set AUTH_TOKEN. this will make the proxy verify the requests authorization header against the AUTH_TOKEN before processing the request.

docker

you can also run the proxy as a docker image sentia/pnr-proxy using the same env vars as described in the previous section.

pnr-proxy's People

Contributors

cullophid avatar

Watchers

 avatar  avatar  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.