Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 OSX 10.8.4 上运行 Codekit。
我可以将文件拖到浏览器中,然后在保存时查看重新加载。如果我尝试访问本地主机上的文件,浏览器会告诉我它无法连接。
换句话说,这有效:
file:///Users/me/Desktop/rubydev/susy/index.html
但这不会:
http://localhost/index.html
关于解决这个问题的任何想法?
编辑:我也试过
localhost/ localhost/susy/index.html
CodeKit 1.x 没有内置服务器,因此不会提供页面。在网站上的演示视频中,我在后台运行 MAMP,它设置为托管给定文件夹http://127.0.0.1:8888/(映射到“localhost”)。
http://127.0.0.1:8888/
您可以使用 MAMP,也可以使用 Node.js、Ruby 或 OS X 本身内置的 Apache 堆栈设置服务器。