Init Elixir project

Starting fresh with...

```shell
mix new server
```
This commit is contained in:
William Carroll 2020-12-11 22:42:16 +00:00
parent c23a12746c
commit 6ff814a6d3
8 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]

View file

@ -0,0 +1,24 @@
# The directory Mix will write compiled artifacts to.
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where third-party dependencies like ExDoc output generated docs.
/doc/
# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
# Also ignore archive artifacts (built via "mix archive.build").
*.ez
# Ignore package tarball (built via "mix hex.build").
server-*.tar

View file

@ -0,0 +1,21 @@
# Server
**TODO: Add description**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `server` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:server, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/server](https://hexdocs.pm/server).

View file

@ -0,0 +1,18 @@
defmodule Server do
@moduledoc """
Documentation for `Server`.
"""
@doc """
Hello world.
## Examples
iex> Server.hello()
:world
"""
def hello do
:world
end
end

View file

@ -0,0 +1,27 @@
defmodule Server.MixProject do
use Mix.Project
def project do
[
app: :server,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:cortex, "~> 0.1", only: [:dev, :test]}
]
end
end

View file

@ -0,0 +1,4 @@
%{
"cortex": {:hex, :cortex, "0.6.0", "8094830fae266eb0ae34d1a58983c0c49484341f5044fb4dfb81746647bd2993", [:mix], [{:file_system, "~> 0.2", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm", "d0ef5a2b1269626149118684dc4ea77dbfbc67017f4b4065b71dcefa26cfcc49"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
}

View file

@ -0,0 +1,8 @@
defmodule ServerTest do
use ExUnit.Case
doctest Server
test "greets the world" do
assert Server.hello() == :world
end
end

View file

@ -0,0 +1 @@
ExUnit.start()