chaitanya

chaitanya

Hello,
I am very new to Phoenix. I am trying to develop an app with Mongodb as database. i have now installed latest version of Phoenix i.e. 1.4. I believe this is a very basic question to ask, but kindly bear with it.
I have searched for a solution to use mongodb and found few links which are kind of bits and pieces and i was not sure to which version of Phoenix they refer to. So here are my questions.

  1. While using mongodb with phoenix 1.4, do we need Ecto? (I tried to create new project with “mix phx.new hello --database mongodb”, but it failed to recognize mongodb. only options available are postgres, mysql, mssql).
    – as i have read in an article that mongodb driver can be used. so not sure if ecto is reqiured.
  2. is there any link which can walk through the entire process of creating a new project with mongodb.

Thanks for taking time in reading my question.

Showing Posts 1 to 6

peerreynders

peerreynders

I believe this is a very basic question to ask

Not as basic as you may think as MongoDB isn’t as popular as it is in other communities.

Hex: mongodb, mongodb_ecto

Have you looked at

yet?

  • For learning Phoenix it might be easier to simply stick to the default PostgreSQL setup.
  • If you need to use MongoDB it may make more sense to get your bearings with plain Elixir first before you try to use it in Phoenix (How to use MongoDB With Elixir - Revisited (2016)).

It has been done … but pretty much expect this attitude:


CRUD

Ankhers

Ankhers

No you do not. The mongo ecto adapter has not had work done on it for a little while. With the release of Ecto 3.0, I was going to try and get it updated, but have not yet found the time.

Not that I am aware of. Just add the mongodb package to your deps list. The documentation (linked by @peerreynders) shows the basics of using it. If you have any questions or concerns, feel free to PM me here, on the Elixir slack or on IRC.

chaitanya

chaitanya OP

thank you @peerreynders and @ankhers for your inputs. As suggested by @peerreynders i will try practicing and getting my hands around phoenix with postgresql.
I will update on my progress.
Once again thanks for your time in addressing my concerns. it helped.

pierreabreup

pierreabreup

hi @chaitanya, I did an implementation of Mongodb and Phoenix. You can check in my repository GitHub - pierreabreup/graphqlapi-with-elixir-and-mongo · GitHub

chaitanya

chaitanya OP

Hi @pierreabreup. The solution is amazing. And I really appreciate you recollecting this thread and updating me. I am currently checking GraphQL. I will make use of your work and will try to contribute to the GitHub respository.

mkunikow

mkunikow

ehhh No SQL, No SQL is passe. Now is New SQL :slight_smile:
SQL → NO SQL → and here we back again to SQL or rather New SQL (like google spanner, or crouch db)

Also Redhat ditched Mongo DB for PostgreSQL after Mongo DB changes licence :slight_smile:

MongoDB changed licence when AWS was hosting own MongoDB without any contribute back to MongoDB :slight_smile:. After MongoDB changed licence AWS screw MongoDB again creating theirs own version of MongoDB called documentdb Amazon DocumentDB- Serverless, fully managed, MongoDB API-compatible document database
https://www.awsgeek.com/posts/Amazon-DocumentDB/

So MongoDB is screwed now :smiley: as open source database.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews