'How Can i open different files using expres.js?

I'm starting a journey with node.js and frameworks and I get big problem. I set up API on localhost:3000 and I wanna open different files by adding to URL word for example localhost:3000/quiz. I used command res.sendFile(path.join(__dirname+'/index.html')); but i only get,, Error: ENOENT: no such file or directory, stat 'C:\Users\Darek\Desktop\Frontend\Quiz api\index.html'"

Thanks

CLOSED

EDIT: Routes files called quiz.js

Index.js server code



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source