KEMBAR78
My journey from PHP to Node.js
My journey from PHP to
Node.js
Valentin Lup
@LupValentin valentinlup
Moving to Node.js
Language
Templating
Session
Authentication
PHP → JS
PHP Templating → EJS
PHP Sessions → express-session
PHP Auth → passportJS & passport-local
Moving to Node.js (contd.)
HTTP Server
Deploy
Headers Security
Apache → Node Server with Express &
Nginx
Git/FTP → Git/FTP + pm2
SecureHeaders → Helmet
Demo
http://46.101.226.107/
Thank you
More Code:
https://github.com/valentinlup/node-playground
Resources
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
https://yarnpkg.com/en/docs/install#linux-tab
http://pm2.keymetrics.io/
https://stackoverflow.com/questions/tagged/node.js
https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps
http://expressjs.com/en/starter/basic-routing.html
https://github.com/expressjs/session
https://github.com/passport/express-4.x-local-example

Editor's Notes

  • #2 JS mindset change from frontend to backend number of proc -1 what is helmet
  • #3 Cine sunt (3PG. JS developer). Cand nu lucrez si nu sunt la tim.js, I’m a dad
  • #4 Daca vii din PHP, getting started in JS Daca vii din frontend, getting started in node.js JS e asociat cu lumea UI in general, dar astazi as vrea sa pun la indoiala aceasta mentalitate
  • #5 Session: PHP session_start(), $_SESSION Passport: authentication middleware for Node.js
  • #6 Helmet: CSP(load only code from safe servers), noCache, X-Frame-Options PM2: Process manager with built in load balancer. Supports node process scaling
  • #7 Upgrading from express with ejs pages to modern UI stack you just need to replace web routes with your SPA. Hope you enjoyed listening to this as much as I enjoyed talking about it.