$30 off During Our Annual Pro Sale. View Details »
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
160
One spec to rule them all
paulsouche
1
290
Analytics reverse engineering
paulsouche
0
160
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
愛される翻訳の秘訣
kishikawakatsumi
1
310
Level up your Gemini CLI - D&D Style!
palladius
1
180
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
140
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
580
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
230
AIコーディングエージェント(NotebookLM)
kondai24
0
170
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.3k
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
150
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
300
AWS CDKの推しポイントN選
akihisaikeda
1
240
SwiftUIで本格音ゲー実装してみた
hypebeans
0
110
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Scaling GitHub
holman
464
140k
Raft: Consensus for Rubyists
vanstee
141
7.2k
Designing Experiences People Love
moore
143
24k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Context Engineering - Making Every Token Count
addyosmani
9
490
Speed Design
sergeychernyshev
33
1.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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