“Cannot GET /” with Connect on Node.js

后端 未结 10 1240
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-01 00:40

I\'m trying to start serving some static web pages using connect like this:

var connect = require(\"connect\");
var nowjs = require(\"now\");
va         


        
10条回答
  •  死守一世寂寞
    2020-12-01 01:15

    You'll see the message Cannot GET / if you don't specify which page it is that you're trying to get, in other words if your URL is something like http://localhost:8180. Make sure you enter a page name, e.g. http://localhost:8180/index.html.

提交回复
热议问题