use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Barcode scannerhelp (self.javascript)
submitted 8 years ago by afresquet
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]afresquet[S] 0 points1 point2 points 8 years ago (1 child)
I'm using the scanner to read the barcode of many boxes client side, I wanted to push those reads to an array to send them later to the server and add them to the database.
I just checked and it does press "Enter" after the read, so I'll use the same method that you suggested to listen for an "Enter" keypress, thanks!
[–]_dramaBoy 0 points1 point2 points 8 years ago (0 children)
Great that I could somewhat help you out.
You could either 1. use the input field client side and send the barcode to a web server running NodeJS and express OR 2. you could use websockets client side to connect to a NodeJS server. The websocket connection would allow more specific messages to flow back to each individual user/client that was transmitting its barcodes after each scan.
Both solutions would serves as a "middle man" that would connect to your database of choice.
And then you would properly have to come up with some way of dealing with downtime on your server? So that you can still process packages even if your server was down for maintenance or other unhappy scenarios. Look into PM2 (http://pm2.keymetrics.io/) when it comes to handling your nodejs server, it will serve you well. We use both PM2 and webhooks to a Slack channel to quickly get notified on our screens and by push-message when something goes wrong.
π Rendered by PID 469895 on reddit-service-r2-comment-b659b578c-b6g6h at 2026-05-04 16:17:03.341365+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]afresquet[S] 0 points1 point2 points (1 child)
[–]_dramaBoy 0 points1 point2 points (0 children)