nova erlang web 框架,提供了cli ,使用比较方便,web 处理基于了 cowboy (erlang 常用)

依赖的三方包

可以看出,依赖了cowboy(web 处理)

{deps, [
        {cowboy, "2.10.0"},
        {uuid, "2.0.7", {pkg, uuid_erl}},
        {erlydtl, "0.14.0"},
        {jhn_stdlib, "3.6.2"},
        {pmod_transform, "1.1.0"},
        {routing_tree, "1.0.6"}, %  nova 自己开发的
        {thoas, "1.2.0"}
       ]}.       
{cowboy, "2.10.0"},

参考使用

  • 安装
sh -c "$(curl -fsSL https://raw.githubusercontent.com/novaframework/rebar3_nova/master/install.sh)"
  • 使用
    创建项目

 

rebar3 new nova my_first_nova

项目结构

├── config
│   ├── dev_sys.config.src
│   ├── prod_sys.config.src
│   └── vm.args.src
├── priv
│   └── assets
│       └── favicon.ico
├── rebar.config
├── rebar.lock
└── src
    ├── controllers
    │   └── my_first_app_main_controller.erl
    ├── my_first_app.app.src
    ├── my_first_app_app.erl
    ├── my_first_app_router.erl
    ├── my_first_app_sup.erl
    └── views
        └── my_first_app_main.dtl
│   ├── dev_sys.config.src

启动

rebar3 nova serve

效果

nova erlang web 框架_github

参考资料

https://github.com/novaframework/nova
https://github.com/novaframework/routing_tree
https://github.com/novaframework/routing_treehttps://hexdocs.pm/nova/quick-start.html#content
https://bercovici-adrian-simon.medium.com/building-an-erlang-web-api-using-nova-framework-and-redis-141edf170ef7
https://hexdocs.pm/nova/nova.html