phunsukh1
Using bandit with postgrex directly for rest api?
Hi all,
I’m experimenting with using Bandit as the webserver and Postgrex directly for a REST API without any framework layer.
Background:
We have an older app with a lot of plain SQL that we want to transition incrementally. Keeping SQL as-is to reduce risk.
Our VP wants the team to learn Elixir and OTP, and he has a strong philosophy: you should know every line of code you write — no abstractions. Phoenix would be nice, but right now it’s not an option.
Is anyone running Bandit + Postgrex directly? If so, any tips on:
· What to look out for
· Issues you faced
· How you manage the connection pool
Thanks!
Most Liked
FlyingNoodle
I have a strong philosophy too:
If some higher up would tell me something like this I would update my CV and start looking.
LostKobrakai
Bandit only works with plug for handlers anyways. It doesn‘t have a separate bandit specific handler abstraction.
I‘d still go with ecto, even if you just use it as a means of having a repo to issue sql queries against. But it‘ll be a less harsch to move once you want to use more of the toolkit
NobbZ
NIH-syndrome?
To be honest, this philosophy usually ends up in having to keep more in the head than just using phoenix.
Sure, using “vanilla bandit” will also work, though depending on the scope of the application, you will eventually ending up writing your own abstractions, which any new team member had to learn, making their onboarding more complicated.
While with phoenix, you can just assume, developers know it, or will at least be able to a “blog in 15 minutes” tutorial before having their first day (or even. on their first day) and be able to understand the most important concepts.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









