我对如何在Cloud9IDE上运行go lang run服务器感到有点困惑。这是我正在尝试运行的简单go服务器:
https://ide.c9.io/amanuel2/golangpractice
我试着点击run,然后转到它想让我去的url,但是它告诉我404没有找到...在cloud9上单击run时,我还在命令行中看到了以下输出:
Your code is running at https://golangpractice-amanuel2.c9users.io.
Important: use os.Getenv(PORT) as the port and os.Getenv(IP) as the host in your scripts!
2016/03/14 11:45:51 Listening on port 8080 ... 请帮帮我!
发布于 2016-03-14 22:03:40
您看到的404来自webserver.go的142行,因此您的应用程序实际上运行正常。从您的代码中看,您似乎有一条通往/item/name的路由,因此尝试访问https://golangpractice-amanuel2.c9users.io/item/name,您将在那里获得一些信息。
由于线路142,所有其他路由都给出了404。
https://stackoverflow.com/questions/35986940
复制相似问题