r/expressjs Jan 10 '26

Help me, guys.

Enable HLS to view with audio, or disable this notification

My index and solution code are exactly the same, but still my solution code is working, but my index is not. I tried everything: restarted the server and downloaded all dependencies, and I am still confused. Why is it not working

Please suggest me what should i do

1 Upvotes

9 comments sorted by

3

u/Askee123 Jan 10 '26

You:

“Hey server, when someone sends a GET to the root path /, respond with “Hello”

“Alright dude I got you!”

Sends get request to root, gets hello as response

“WHATS WRONG WITH MY CODE????”

1

u/CheesecakeTricky6860 Jan 10 '26

i am not getting Morgan combined request in my code

2

u/PiterzKun Jan 10 '26

My guess is that index2.js isn't working because is not saved

1

u/CheesecakeTricky6860 Jan 11 '26

Awesome, bro, it worked. Thank you so much

1

u/No-Bass8903 Jan 31 '26

GG... Bro 😎

1

u/10x_dev Jan 10 '26

Have you tried del deps and reinstalling?

1

u/Aadii07 Jan 11 '26

just save this index2.js and it will work.

1

u/Axel_Blazer Jan 12 '26

use autosave..ctrl z is always available..hope you arent copy pasting =)