single-file-elixir/readme.md

34 lines
777 B
Markdown
Raw Permalink Normal View History

2024-02-20 20:37:55 -06:00
# Single-File Elixir (`sfe`)
I love Elixir, but for some reason I can't stand it's default project structure
and willingness to spread a hundred things across a hundred files.
I was inspired by this:
https://github.com/wojtekmach/mix_install_examples/blob/main/phoenix_live_view.exs
So I've put this together in a Nix Flake to serve as a decent launch point for
quick-and-dirty Elixir applications.
2024-02-20 22:06:00 -06:00
`mix.exs` is necessary for locking dependencies as used by Nix's `mixFodDeps`
and is used for nice things like code reloading by Phoenix, so not _quite_ as
"single file" as my inspiration.
So here ya go!
2024-02-20 20:37:55 -06:00
```bash
2024-05-29 07:37:53 -05:00
mix setup
mix dev
2024-02-20 20:37:55 -06:00
```
Or if you want "hot reloading"
```bash
watchexec --filter main.ex --restart 'elixir main.ex'
```
# To Do
2024-02-20 22:15:48 -06:00
- Code reloading
- Tailwind