基于Erlang - Chicago Boss框架的TODO

TODO源代码:https://github.com/vessi/chicago-todo/

使用Chicago Boss 0.88  - 下载: http://www.chicagoboss.org/download.htm

1. 创建todo项目:

在Chicago boss目录内,运行:make app PROJECT=todo

2. 会退到上级目录,进入todo项目目录。

3. 修改boss.config文件,找到{server, cowboy},改为{server, mochiweb} 

注意: Chicago Boss 0.88 默认使用cowboy做服务器,但笔者使用cowboy无法启动服务。

4. 项目中加入各层代码:

    controllers: https://github.com/vessi/chicago-todo/tree/master/src/controller

    models: https://github.com/vessi/chicago-todo/tree/master/src/model

    views: https://github.com/vessi/chicago-todo/tree/master/src/view/home

    其他libs: https://github.com/vessi/chicago-todo/tree/master/src/lib

5. 修改/priv/todo.routes文件,在底部加入:{"/", [{controller, "home"}, {action, "home"}]}.

6. 添加static文件:https://github.com/vessi/chicago-todo/tree/master/priv/static

7. 启动项目: ./init-dev.sh, 访问: http://localhost:8001/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值