Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skluck/elixir-json-cli
A simple json parser CLI - Demo Elixir App
https://github.com/skluck/elixir-json-cli
Last synced: 12 days ago
JSON representation
A simple json parser CLI - Demo Elixir App
- Host: GitHub
- URL: https://github.com/skluck/elixir-json-cli
- Owner: skluck
- License: mit
- Created: 2015-04-20T18:12:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-22T02:08:24.000Z (over 9 years ago)
- Last Synced: 2024-10-07T02:41:54.438Z (about 1 month ago)
- Language: Elixir
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## A simple json parser CLI - Demo Elixir App
**"My First Elixir Application"** - This is a simple demo app to explore how to create a command line application.
### Elixir ecosystem
- iex (repl)
- mix (build tool)
- hex (package manager)
- exUnit (unit testing)### Commands
- `mix deps.get`
> Download dependencies- `iex -S mix`
> Compile application into iex context- `mix escript.build`
> Elixir and Erlang code is compiled to beam application code. To make this code executable, escript must be generated
> that embeds all elixir code to run from the shell. Only erlang must be installed to run this escript.- `mix test`
> Run unit tests### Anatomy of an Elixir app
Relative from application root:
```
_build/
dev/
env2/
prod/config/
config.exsdeps/
lib/
application-name.extest/
mix.exs
mix.lock
```- `_build/` (git ignored)
> Contains compiled builds, separated by environment- `config/`
> Configuration files, main entrypoint `config.exs` and individual environments.- `deps/` (git ignored)
> Dependencies, Same as "vendor" for most languages- `lib/`
> Where your code goes. Includes application entrypoint `application-name.ex`.- `test/`
> Unit tests- `mix.exs`
> Build configuration. Also declare dependencies and tasks like composer, gulp, make, etc.- `mix.lock`
> Locked sources and dependencies