https://sleepy-tundra-77425.herokuapp.com/
This application enables the user to scan any particular QR code and view the generated result via phone/web.
1) The generated result of the QR code will open up in a new window iff it's a valid URL.
2) DESKTOP/WEB : User can either drag and drop the image of the QR code or upload one using the browse button.
3) IOS/ANDROID : User can scan a QR code using the phone camera by clicking on the browse button.
Used for creating and styling the webpages
Node.js is an open-source and cross-platform JavaScript runtime environment.Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser.A Node.js app runs in a single process, without creating a new thread for every request.
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.Express provides a thin layer of fundamental web application features, without obscuring NodeJS.Creating API is quick and easy.
qrcode-reader:for decoding the uploaded QR codes
Jimp: for parsing the uploaded images
Multer: for uploading files/images
PM2 is daemon process manager that will help you manage and keep your application online. Getting started with PM2 is straightforward,it is offered as a simple and intuitive CLI, installable via npm.
Heroku is a cloud platform(PAAS) as a service supporting several programming languages that enables developers to build, run, and operate applications entirely in the cloud.
`ab` is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.
EndPoint : '/upload'
Method : POST,
Content-Type : multi-part,
Body : encoded image-file,
Response : {success:boolean,output:decoded result},
Sample CuRL : curl 'https://sleepy-tundra-77425.herokuapp.com/upload' \
-H 'Connection: keep-alive' \
-H 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Mobile Safari/537.36' \
-H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarynHvJY7tKzFcJLfJB' \
-H 'Accept: */*' \
-H 'Origin: https://sleepy-tundra-77425.herokuapp.com' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://sleepy-tundra-77425.herokuapp.com/' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-Decreased Upload time -Images were compressed before uploading in order to speed up the working of the API.
>Initial time: 6-8 sec
>Final time : 2-3 sec
-Benchmarking done using Apache Benchmark.Thus the system will be able to run or handle atleast 11 requests/sec which satisfies the given criteria of 1 Million requests/day