Created
June 13, 2015 04:31
-
-
Save darui00kara/d056b13626862ec5ae8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule PhoenixBbs.Router do | |
| use PhoenixBbs.Web, :router | |
| pipeline :browser do | |
| plug :accepts, ["html"] | |
| plug :fetch_session | |
| plug :fetch_flash | |
| plug :protect_from_forgery | |
| end | |
| pipeline :api do | |
| plug :accepts, ["json"] | |
| end | |
| scope "/", PhoenixBbs do | |
| pipe_through :browser # Use the default browser stack | |
| get "/", PageController, :index | |
| end | |
| scope "/bbs", PhoenixBbs do | |
| pipe_through :browser # Use the default browser stack | |
| get "/", BbsController, :index | |
| post "/comment_input", BbsController, :create | |
| end | |
| # Other scopes may use custom stacks. | |
| # scope "/api", PhoenixBbs do | |
| # pipe_through :api | |
| # end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment