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
paul souche
May 19, 2014
Programming
0
560
Ma caisse enregistreuse en NodeJS
paul souche
May 19, 2014
Tweet
Share
More Decks by paul souche
See All by paul souche
Une API from scratch avec NestJS
paulsouche
0
160
Unit test in deno
paulsouche
0
150
One spec to rule them all
paulsouche
1
290
Analytics reverse engineering
paulsouche
0
150
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.9k
Test like a boss with TypeScript
paulsouche
0
220
The internal modules strike back
paulsouche
0
120
AngularJS + Typescript === <3
paulsouche
0
350
Other Decks in Programming
See All in Programming
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
110
Amazon Bedrock Knowledge Bases Hands-on
konny0311
0
150
2025 컴포즈 마법사
jisungbin
0
120
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
130
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
330
Building AI with AI
inesmontani
PRO
0
110
GraalVM Native Image トラブルシューティング機能の最新状況(2025年版)
ntt_dsol_java
0
120
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
700
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
470
PHPライセンス変更の議論を通じて学ぶOSSライセンスの基礎
matsuo_atsushi
0
140
複数チーム並行開発下でのコード移行アプローチ ~手動 Codemod から「生成AI 活用」への進化
andpad
0
150
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
530
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Rails Girls Zürich Keynote
gr2m
95
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
1.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Making Projects Easy
brettharned
120
6.4k
Become a Pro
speakerdeck
PRO
29
5.6k
Writing Fast Ruby
sferik
630
62k
Thoughts on Productivity
jonyablonski
73
4.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
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