Elixir Web 框架:Phoenix
jopen
10年前
Phoenix 是函数式编程语言 Elixir 的 Web 开发框架。用于创建功能齐全,拥有实时功能的容错应用程序。
Router example
defmodule MyApp.Router do use Phoenix.Router pipeline :browser do plug :accepts, ~w(html) plug :fetch_session end pipeline :api do plug :accepts, ~w(json) end scope "/", alias: MyApp do pipe_through :browser get "/pages/:page", PageController, :show get "/files/*path", FileController, :show resources "/users", UserController do resources "/comments", CommentController end end scope "/api", alias: MyApp.Api do pipe_through :api resources "/users", UserController end end