Codekit文件未在localhost上显示... Chrome无法连接到服务器

时间:2013-07-02 01:53:46

标签: localhost codekit

在OSX 10.8.4上运行Codekit。

我可以将文件拖到浏览器中,然后在保存时看到重新加载。如果我尝试访问localhost上的文件,浏览器会告诉我它无法连接。

换句话说,这有效:

file:///Users/me/Desktop/rubydev/susy/index.html

但这不是:

http://localhost/index.html

关于修复此问题的任何想法?

编辑:我也试过

localhost/
localhost/susy/index.html

Here's a screenshot of my codekit screen

and setup dialog

1 个答案:

答案 0 :(得分:1)

CodeKit 1.x没有内置服务器,因此不会提供页面服务。在网站上的演示视频中,我正在后台运行MAMP,它设置为在http://127.0.0.1:8888/(映射到“localhost”)托管给定文件夹。

您可以使用MAMP,也可以使用内置于OS X本身的Node.js,Ruby或Apache堆栈来设置服务器。