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
540
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
140
One spec to rule them all
paulsouche
1
280
Analytics reverse engineering
paulsouche
0
140
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.9k
Test like a boss with TypeScript
paulsouche
0
210
The internal modules strike back
paulsouche
0
120
AngularJS + Typescript === <3
paulsouche
0
340
Other Decks in Programming
See All in Programming
A comprehensive view of refactoring
marabesi
0
970
KotlinConf 2025 現地参加の土産話
n_takehata
0
100
Benchmark
sysong
0
220
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
130
カクヨムAndroidアプリのリブート
numeroanddev
0
430
赤裸々に公開。 TSKaigiのオフシーズン
takezoux2
0
140
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
540
Bytecode Manipulation 으로 생산성 높이기
bigstark
2
360
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
840
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
220
GoのGenericsによるslice操作との付き合い方
syumai
2
670
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
220
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Into the Great Unknown - MozCon
thekraken
39
1.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
A better future with KSS
kneath
239
17k
Scaling GitHub
holman
459
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
Designing Experiences People Love
moore
142
24k
Speed Design
sergeychernyshev
31
1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.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