Skip to content
Sign upLog in
← Back to Community

Cannot Get / Error.

Profile icon
phyouthcenter1

I am trying to create a Roblox ranking module but it says "Cannot Get /".
Does anyone know hw to fix this?

Voters
Profile icon
phyouthcenter1
Comments
hotnewtop
Profile icon
notGilbert

it seems like there are no handlers for GET / but there are handlers for other routes

you'll need to add your own handler

app.get('/', (req, res) => { res.send('Hello World!'); // or do whatever you want with req or res })
Profile icon
phyouthcenter1
Profile icon
phyouthcenter1
Profile icon
notGilbert

@phyouthcenter1

looks like there are handlers for GET / when the configuration is invalid, but when the config is correct there is none

to add your own handler, just add this:

app.get('/', (req, res) => { res.send('Hello World!'); // or do whatever you want with req or res })

to the code, after everything but the app.listen

Profile icon
mahadr64

I must say i loved reading your blog. It had been well authored and easy to understand. Unlike other blogs I have read which are really not too good.Thanks alot! เว็บตรง อันดับ 1

Profile icon
phyouthcenter1

@mahadr64
What blog-