nodejs / examples

A repository of runnable Node.js examples that go beyond "hello, world!"
MIT License
649 stars 343 forks source link

wishlist: Express examples #10

Open bnb opened 4 years ago

bnb commented 4 years ago

It would be genuinely wonderful to get some examples of Express into the examples repo's servers examples.

Ideally, these examples will:

Please see CONTRIBUTING.md for more context on how to contribute. Please feel free to ask any questions here ❤️

gireeshpunathil commented 4 years ago

I am happy to contribute here.

bnb commented 4 years ago

Yay! If you have any questions @gireeshpunathil, more than happy to do what I can to help get you going 👍

gireeshpunathil commented 4 years ago

to start with, here is what I think the app could contain:

and some tests. let me know WDYT!

bnb commented 4 years ago

that sounds good to me, though I'm not sure if fetching data from a database is meaningfully testable in CI. More than happy to be wrong!

gireeshpunathil commented 4 years ago

my idea was to look for an in-memory db for this purpose: while not making things too complex, and still caters to a very common programming scenario.

bnb commented 4 years ago

sounds good to me :)

ghost commented 4 years ago

Maybe it would be worth to include examples in other frameworks (like Koa or Nest) as well as a server in pure Node.js just to show the difference and pros/cons of each approach?

I believe there could be some situations where using pure Node would make a perfect sense. What do you think?

bnb commented 4 years ago

@iandrc The intent of this repository is to include many different kinds of examples. I'd look at it less as a pros/cons comparison and more of a way to demonstrate how things work in general. Ideally, with enough examples, the similarities and differences could be figured out by reading/running those difference examples.

trevatk commented 3 years ago

I've got some working examples with mongodb and mysql2. Sorry late to party here and very new too contributing altogether.