Expose functions at API layer
Creating a simple HTTP RESTful API for exposing our `Server.semiprime` function. It supports some help messages, primitive parsing and error handling, and singular vs. batch processing of arguments. For more sophisticated parsing and error-checking, I prefer to use Haskell's Servant library.
This commit is contained in:
parent
45877a8b9c
commit
8c5e4e77ed
4 changed files with 104 additions and 2 deletions
|
|
@ -22,7 +22,11 @@ defmodule Server.MixProject do
|
|||
# Run "mix help deps" to learn about dependencies.
|
||||
defp deps do
|
||||
[
|
||||
{:cortex, "~> 0.1", only: [:dev, :test]}
|
||||
{:cortex, "~> 0.1", only: [:dev, :test]},
|
||||
{:plug_cowboy, "~> 2.4.1"},
|
||||
{:cowboy, "~> 2.8.0"},
|
||||
{:plug, "~> 1.11.0"},
|
||||
{:poison, "~> 4.0.1"}
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue