Skip to content

Instantly share code, notes, and snippets.

@mingyuchoo
Created March 21, 2024 02:06
Show Gist options
  • Save mingyuchoo/4a8cf829d3a15925843f4f5da83b7b75 to your computer and use it in GitHub Desktop.
Save mingyuchoo/4a8cf829d3a15925843f4f5da83b7b75 to your computer and use it in GitHub Desktop.
How to Elixir and Phoenix install and run

Phoenix Framework

endpoint -> router -> controller -> view

iex -S mix phx.server

API 설계

API 1

Router 추가

경로:

  • $WEB/lib/<project_name>_web/router.ex

Controller 추가

경로:

  • $WEB/lib/<project_name>_web/controllers/<path_name>_controller.ex

View 추가

경로:

  • $WEB/lib/<project_name>_web/controllers/<path_name>_html.ex
  • $WEB/lib/<project_name>_web/controllers/<path_name>_html/index.html.heex

Plugin 추가

경로:

  • $WEB/lib/<project_name>_web/plugs/<plug_name>.ex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment