The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Anybody used Node.js to process forms?

  • This topic is empty.
Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
  • #179566

    I’ve got it figured. If I’d seen that, I would’ve figured it much more quickly.


    Good to hear.

    It took me about 2+ hours to install Arch Linux ARM on an RPI because of one stupid little thing like that. Should have taken about 10 minutes.


    I haven’t really done anything with node (it’s on my list of things to do). Is next() like then() with promises? Or is it more like a resolve() to a hidden promise-like structure?

    I’m currently digging ES6 promises, and I’m hoping that there is some conceptual overlap.


    Is next() like then() with promises?

    Well… not really. It might be implemented as a promise, I suppose, but that’s not really the functionality it exposes. It just facilitates turn-taking.

    With a promise, you attach a “success” and an “error” callbacks to your promise function. In comparison, Express makes a list of all the functions you want your app to run (“middleware”), then calls the first one. It won’t call the second one until you call next (from somewhere inside your first function).

    The link that NIX gave earlier is a pretty good explanation, though Express modifies it a bit from the original version from Connect (express is written on top of connect).

Viewing 4 posts - 16 through 19 (of 19 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.