Skip to content

tedpark/elixir_with_mongo_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElixirMongodb

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

한국어로 설명된 블로그.

https://itstedpark.medium.com/elixir-phoenix-with-mongodb-%EB%A1%9C-%EB%A7%8C%EB%93%A4%EC%96%B4%EB%B3%B4%EA%B8%B0-31cbda2da37e

url 주소는 수정하면 됩니다. mongodb atlas srv 주소도 지원합니다.

{ url: "localhost:27017"}
{ Mongo, [name: :mongo, database: "YOUR_DATABASE", username: "USERNAME", password: "PASSWORD", url: "localhost:27017"] }

ProgrammingController 에서 아래 devs 를 자신의 db 이름으로 수정 하면 됩니다.

def index(conn, \_params) do
  cursor = Mongo.find_one(:mongo, "devs", %{})

질문은 itstedpark@gmail.com 혹은 issue 에 남겨주세요.

Ready to run in production? Please check our deployment guides.

Learn more

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages