dongruoqiong9017 2014-08-11 05:31
浏览 66
已采纳

如何设置一个简单的测试Web服务器?

I'm a bit new to php so I've never dealt with test servers before, but with the release of Google's Polymer project I now need a test server in order to go through their tutorial, so here it goes!

I use Intellij for all of my web coding and am having trouble trying to get a test server up and running. I'm on OSX and have downloaded things such as MAMP but can't seem to get the test server actually.. running with Intellij. Or know how to view my website on the test server with Intellij. I've looked up so many guides but just can't seem to figure it out.

Any help? Even a link to something useful? Please!

Thank you for any help!

  • 写回答

1条回答 默认 最新

  • douxuanpa8298 2014-08-11 05:51
    关注

    You can start up a simple HTTP server for debugging purposes from any directory, if you have Python installed. Run:

    $ python -m SimpleHTTPServer 8000
    

    Now you can access the directory as a web site directory using:

    http://localhost:8000
    

    You'll need better alternatives as you explore more advanced stuff, but this works just fine as a starting point.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码