Is it possible to create APis with plain elixir?

Is it possible to create APis with plain elixir?
Like scrape random cat images, yk what these cool kids are doing nowadays

As opposed to using a framework? It certainly is possible :slight_smile:

Als always: it depends….(mostly on you skills)

If you inspect the source of Plug you won’t find any exotic Elixir there either.

I’ve met people (and currently even work with them) who think Phoenix is too heavy. I disagree with them but I get where they’re coming from – I too love minimum amount of files and being able to put the entire app in my head and not having to worry about code injected via macros, and infer code’s meaning by utilizing convention over configuration thinking, etc.

So I’d recommend trying Plug and reading a few blog posts about it. It’s fairly minimal and stays out of the way, and what’s most important: it’s very explicit and doesn’t do things unless you order it to do so.

1 Like

And here you can find a tutorial: Minimal Elixir JSON RESTful API. How to expose a JSON endpoint in Elixir… | by Kamil Lelonek | Kamil Lelonek - Software Engineer

While it is possible, you can also make use of the convenience of Phoenix and take out all the bits you don’t want.