GithubHelp home page GithubHelp logo

miguelramosfdz / p2jsvc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from modesty/p2jsvc

0.0 1.0 0.0 25.33 MB

A RESTful web service adaptor for pdf2json, built with restify and nodejs.

License: MIT License

JavaScript 100.00%

p2jsvc's Introduction

p2jsvc

A RESTful web service adaptor for pdf2json, built with restify and nodejs.

##Installation

            git clone https://github.com/modesty/p2jsvc
            cd p2jsvc
            npm install

##Start the Server

            cd p2jsvc
            node index

You should see '[time_stamp] - PDFFORMServer1 listening at http://0.0.0.0:8001' in termial window.

##Service Status Check

            curl -isv http://0.0.0.0:8001/p2jsvc/status

Response should include something like this:

            {"status":{"code":200,"message":"OK","fieldName":"PDFFORMServer1"}}

##Test with GET

            curl -isv http://0.0.0.0:8001/p2jsvc/data/xfa_1040ez
            curl -isv http://0.0.0.0:8001/p2jsvc/data/xfa_1040a
            curl -isv http://0.0.0.0:8001/p2jsvc/data/xfa_1040

##Test with POST

            curl -isv -H "Content-Type: application/json" -X POST -d '{"folderName":"data", "pdfId":"xfa_1040ez"}' http://0.0.0.0:8001/p2jsvc
            curl -isv -H "Content-Type: application/json" -X POST -d '{"folderName":"data", "pdfId":"xfa_1040a"}' http://0.0.0.0:8001/p2jsvc
            curl -isv -H "Content-Type: application/json" -X POST -d '{"folderName":"data", "pdfId":"xfa_1040"}' http://0.0.0.0:8001/p2jsvc

##Concurrency Benchmark Test

            ab -n 10 -c 10 http://0.0.0.0:8001/p2jsvc/data/xfa_1040ez
            ab -n 10 -c 10 http://0.0.0.0:8001/p2jsvc/data/xfa_1040a
            ab -n 10 -c 10 http://0.0.0.0:8001/p2jsvc/data/xfa_1040

##More Info

Restful Web Service for PDF2JSON

p2jsvc's People

Contributors

lambdafu avatar modesty avatar

Watchers

 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.