-
Notifications
You must be signed in to change notification settings - Fork 141
test
fansekey edited this page Apr 28, 2015
·
6 revisions
为了做到前后端分离,fisp 提供了一个 web 服务,提供了一套本地渲染 Smarty 的 APP 套件,支持 URL 转发、测试数据模拟等功能;
本地 Web 服务是通过 fisp server
命令操作的;它是一个完整的 Web 服务,可以解析 PHP;
-
开启服务
fisp server start
-
关闭服务
fisp server stop
-
重启服务
fisp server restart
-
查看服务器信息
fisp server info
-
打开服务器根目录
fisp server open
如果你在本地不想用 fisp 提供的 Web 服务,可以用其他服务替代,只是可能需要你自己开发一套 APP 套件或者直接把后端代码部署到你自己的机器上,方便开发。
如果用户没有配置 URL 转发,是按照如下方式去匹配到一个页面的;
比如我有代码路径
fis-conf.js
page/index.tpl
page/home.tpl
假设项目的 namespace = 'work'
那么 release 之后,可以通过如下方式来访问上面提到的两个页面;
-
page/index.tpl
=>http://127.0.0.1:8080/work/page/index
-
page/home.tpl
=>http://127.0.0.1:8080/work/page/home
如果配置了 url 转发,请按照 url 转发配置规则访问这些页面;具体配置参考本地URL模拟转发