How to develop an API which reads Qr Codes in node.js - node.js

I am working on microservice, creating a REST API in node.js using express, I cannot figure out a way to read Qr Codes. How am I supposed to work it out?
P.S I am using zxing library but unable to successfully implement it in my code.
I have tried various solutions including working with alternative libraries but main problem is implementing it.
As I am using my company's system I am not allowed to show all the data here, but I will update the questions with errors soon.
But in simple words whenever I send a Qr code image it fails to read it.

Related

Is there a way to deploy my app on a hosted platform?

Dear Stackoverflow people,
I am facing the following problem:
For an internship in a company I have created a leaflet map with several custom features such as custom popups, markerstyle etc. The thing is, in the end they are supposed to manage the whole thing. Since they don´t know anything about code they asked for the easiest possible way for them to add data to the map.
So I came across the serverside tutorial by CodingTrain using Node.js and thought its perfect for me. Now I created basically a webform that takes up all information, converts it into a geoJSON feature, stores it in a database and sends it to the map to be displayed, great easy GUI to add new features...
Now comes the bummer which I didnt know would be a problem: The website is on a hosted service called Bitrix. I uploaded my project and it does not recognize the routes and cant write to the database or anything. I actually dont know whether I can run node on this platform?
I had the idea to launch the whole thing on a Service like Heroku or Glitch and just take the map from there and include it into the other website via an Iframe or something like that. Do you guys think thats feasible? Are there any other better ways?
Sorry for my obvious cluelessness but I´m completely new to serverside programming and thought I´d found an easy way out... I am grateful for any kind of suggestions or help!

Can I generate client code using SpringFox?

I am trying to determine if it is possible to generate client code / stubs (in C#) for my API. The API back-end has largely been generated using JHipster, and is Spring based. It is already configured to use SpringFox for generating documentation (and that works nicely).
I admit that I don't have a good understanding of how all these pieces and parts fit together. A lot of this is new to me. As I understand it, SpringFox builds its documentation from the API itself by interrogating the code. And I understand that Swagger/OpenAPI is able to generate client code using the CodeGen projects. So it seems it should be possible to combine SpringFox and CodeGen to generate client code from the server code, but I haven't been able to work out how to do this.
Can someone give me some pointers on how to make this work? Thanks!

postman apps into nodejs, how it works?

I am still new to learning backend, I think I skipped too quick and I'm trying to push or simple post or call ? or request ? to localhost:3333/api/notifybut using or implement in node.js or cli ? or just use coding, not using application like this below picture (using postman-apps), so everytime i run the program, it will trigger and push to that localhost rather than using postman-apps. also so i know how it works because this postman is a simulation right?
basicly I still lack of knowledge about this so I don't really know what is this postman, is this like a server then does get.req ? or something, I was searching a lot but also I really have no idea. I will be happy if you show me some sources too for me to learn this.
because this postman apps only input http://localhost:3333... and then somehow there are some JSON from the apps itself created ? anyway just answer my very first question, probably i will understand later, thankyou.
nevermind, I learnt it, it was REST-API things

how to write own logic without using qnamaker

I am still trying to understand Chatbots. Currently i have already made chatbot which is integrated in skype. I have Sharepoint online where user search for FAQ. If they dont find then they ask BOT which sends request to LUIS and Qnamaker.
Qnamaker then sends response back by looking it into its database. I upload FAQ from sharepoint to Qnamaker using sharepoint workflows. But i want to write my own logic and get rid of Qnamaker.
What are ways to do it? Any good tutorials? I also wanted to know how the flow happens. For example if we dont use Qnamaker then we fire queries in sharepoint based on what user asked? I dont understand how i can fire queries in sharepoint if user makes typo then we will not get anything from sharepoint. So any tips on how to implement this without using qnamaker is highly appreciated?
The FAQ bot generator is a subset of the main Microsoft bot framework. You should do some research on the Microsoft Bot Framework. The link above takes you right to the documentation overview of the bot framework and from there you can get into developing one. They have links to a few sample projects as well as a large number of code snippets within some of the article explanations. It has a full setup guide that will walk you through the initial setup so it should be easy to get a basic echo bot running, but if you are not a programmer you should stick to the FAQ generator.
I suggest you use either node.js or c# to develop the bot since these are directly supported by the framework. I am personally using c# to build my bot from the ground up. The purpose of mine is to be used within a customer facing android/ios app that will help with questions, checking the status of different things, and even paying bills.
Just remember you will need to manually set up your cloud hosting. I host mine in azure alongside a web interface I built for it (you can build the website inside your bot if you are using c#, just replace the default.htm file in the web.config with the main page of the interface).

Building a web site with photo uploading possibilities with node.js

I'm new into Node.js and my intention is to build a web site similar (but way less complex) than Imgur, where uploading images is possible by dragging photos from desktop to the browser.
For this I want to use Node.js and MongoDB.
I have been looking around everywhere and found a lots of tutorials (many of them out dated) for setting up a database, but none for file uploading. Node.js and all it's modules is like a jungle, and it really isn't easy to know which modules to use in which type of context.
So, what I really could use here is some help with suggestions of tutorials and/or modules that may fit for this purpose. What is the easiest and best way to get started with this?
This is a school project that I need to do (I selected Node.js for server side myself, not knowing how complex it really is and now it's to late to change), so I would really appreciate your help here.
Thanks in advance!
You can get away without using most of the node.js modules aside from the mongodb driver. Express is a popular framework for web applications, but it might even be overkill here. Really, you just need to serve some HTML with the drag and drop code, and then be able to receive and serve images. It's probably less than 50 lines of code in actual node.js, plus whatever frontend code you have.
Check out this tutorial for the image upload portion on the node.js side using express:
https://github.com/visionmedia/express/blob/master/examples/multipart/app.js
Here's a tutorial for the frontend drag and drop functionality:
http://www.thebuzzmedia.com/html5-drag-and-drop-and-file-api-tutorial/
Update You might also consider http://mongoosejs.com/, which makes mongodb interaction a bit easier--but the native driver isn't too bad to use by itself.

Resources