Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ma caisse enregistreuse en NodeJS
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
paul souche
May 19, 2014
Programming
590
0
Share
Ma caisse enregistreuse en NodeJS
paul souche
May 19, 2014
More Decks by paul souche
See All by paul souche
Une API from scratch avec NestJS
paulsouche
0
180
Unit test in deno
paulsouche
0
180
One spec to rule them all
paulsouche
1
320
Analytics reverse engineering
paulsouche
0
170
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.9k
Test like a boss with TypeScript
paulsouche
0
250
The internal modules strike back
paulsouche
0
130
AngularJS + Typescript === <3
paulsouche
0
360
Other Decks in Programming
See All in Programming
Modding RubyKaigi for Myself
yui_knk
0
680
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
3.6k
3Dシーンの圧縮
fadis
1
450
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
660
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
460
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.2k
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
15
7k
初めてのRubyKaigiはこう見えた
jellyfish700
0
220
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
120
Featured
See All Featured
Fireside Chat
paigeccino
42
3.9k
Code Review Best Practice
trishagee
74
20k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
120
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
150
How to build a perfect <img>
jonoalderson
1
5.5k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Curse of the Amulet
leimatthew05
1
12k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Odyssey Design
rkendrick25
PRO
2
640
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
820
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Transcript
Ma caisse enregistreuse en Node.js Paul SOUCHE
Qui je suis / d’où je viens Paul Souche Développeur
Front-end @
Présentation interactive Essayez le hashTag : #maCaisseNodejs Seulement 20 x
2 caractères → Soyez créatifs vous aurez alors 5 secondes minimum pour prendre une photo...
Le contexte But : Gérer des périphériques monétiques et éditiques
depuis un client léger. Problème : Ces équipements communiquent via le port série.
Le contexte Comment atteindre les ports Série depuis un navigateur
? - ActiveX ? - ChromeApp ? - Applet Java ? - Serveur local Il faudra de toute façon installer quelque chose sur le poste client.
Le contexte Le back est développé sur Wakanda (4D javaScript)
→ permet de ne pas changer de langage Comment gérer le protocole COM sur le front ?
L’architecture Node.js à la rescousse : - API permettant de
communiquer sur les ports séries existante : voodootikigod / node-serialport - Serveur express minimal pour une API bas niveau
L’architecture
L’architecture
La stack - AngularJS - Bootstrap - Express - Node
- npm, Bower & Grunt
La stack Les modules en + : - node-serialPort :
voodootikigod / node-serialport - angular-ui bootstrap : angular-ui / bootstrap - paperwork : lperrin / paperwork - ngTailor : lauterry / ngTailor - nodemon : remy / nodemon
La stack : le front
La stack : le back
La stack : le port série Exemple d’échange : EMETTEUR
ENQ (5) STX + données + ETX + LRC EOT (4) RECEPTEUR ACK (6) ACK
La stack : le port serie
Démo ?
Conclusion Lib serialPort node vraiment complète : - liste des
ports série disponibles sur la machine - accès aux callbacks de déconnexion Les difficultés : - CORS et son application par les browsers - L’encodage ascii avec node : NUL.toAscii = ‘ ‘ (V8)
Questions ? Merci à : - AREGIE - Hamdi, Douglas
& Grég - nodejsParis - Vous - Le fer à souder - La caisse de l’hippopotamus à Neuilly - La caisse du franprix en bas de chez moi