midas_browser

Run Midas effects and tasks in the browser.

Package Version Hex Docs

npm install --save @zip.js/zip.js
gleam add midas@1 midas_browser@1
import midas/task as t
import midas/browser

/// Portable task definition that makes a web request and request some random bytes.
pub fn task(){
  let request = todo as "create a request"
  use response <- t.do(t.fetch(request))
  
  use random <- t.do(t.strong_random(10))
  t.done("task finished")
}
  
/// Run the task.
pub fn main() {
  browser.run(task())
}

Further documentation can be found at https://hexdocs.pm/midas_browser.

Development

gleam run   # Run the project
gleam test  # Run the tests
Search Document