4 ms·
1) Install node js 2) npm install express 4) Define handler Seems simple enough ?
by thewarrior 7y ago
1) Install node js
2) npm install express
4) Define handler
Seems simple enough ?
- deleted 7y ago[deleted]
- cpursley 7y agoSimple, except for the Javascript and npm bits...
- Vosporos 7y agoSimple, yes, but managing a MEAN stack (or even just Node + Express) is far from being "easy".
- girvo 7y agoI disagree with the others, and think this is indeed simple enough without caveats about setting it up (setting up WAMP is honestly just as much effort — not much), and what I’ve used to teach friends who wanted to learn some web programming with zero initial understanding. Explaining routes and handlers was a bit hard, compared to files. I wonder if there’s a “file based” version for Node that’d work like and express handler for the files route?
- Wintereise 7y agoFor what it's worth, I agree with you. I associate installing node and installing LAMP/WAMP with similar levels of "difficulty." Sure, `http.createServer` is a few more lines of code compared to the equivalent PHP `hello world` but I don't see it as an insurmountable hurdle.