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
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
Oxlintのカスタムルールの現況
syumai
5
830
[BalkanRuby 2026] Drop your app/services!
palkan
3
710
要はバランスからの卒業 #yumemi_grow
kajitack
0
200
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
11
2.9k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.3k
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
2
980
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.2k
誰も頼んでない機能を出荷した話
zekutax
0
150
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
150
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.5k
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
790
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Producing Creativity
orderedlist
PRO
348
40k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
150
The Cult of Friendly URLs
andyhume
79
6.9k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
580
Unsuck your backbone
ammeep
672
58k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
180
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