The node js server is not loading my website files

后端 未结 2 1023
鱼传尺愫
鱼传尺愫 2020-12-21 15:41

When I run node index.js the browser loads only the html, disregarding javascript, images, and css , and if I try to access a link it shows a blank plage: node.js Cannot GET

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-21 16:41

    Here you have some code to tell your server what to when when the browser requests /.

    app.get('/'
    

    You haven't written anything to tell it what to do when the browser requests /login.html. Write something for that case.

提交回复
热议问题