Skip to content

Conversation

@harmon25
Copy link
Owner

This pull request introduces a new Elixir example implementation for the AtomVM HTTP server, including a complete web console demo. The changes add a new elixir_http project with HTTP API endpoints, a WebSocket handler for live memory updates, static frontend assets, and documentation. Additionally, improvements to code quality are documented, such as replacing a custom iolist length function with a built-in Erlang function.

New Elixir Example Project:

  • Added the elixir_http directory containing an Elixir-based HTTP server example for AtomVM, including Mix project files, source code, and supporting assets. (.github/copilot-instructions.md .github/copilot-instructions.mdR97)
  • Implemented ElixirHttp module with network initialization, HTTP server configuration, and endpoint routing (lib/elixir_http.ex).
  • Added API handler (lib/elixir_http/api_handler.ex) for /api/system_info and /api/memory endpoints, providing system and memory info.
  • Added WebSocket handler (lib/elixir_http/ws_handler.ex) that streams memory updates to clients in real time.

Frontend Web Console:

  • Added static web assets: HTML UI (priv/index.html) and JavaScript app (priv/js/app.js) for displaying system and memory info, including live updates via WebSocket. [1] [2]

Documentation and Code Quality:

  • Added README and Mix project documentation for the new example (README.md, mix.exs). [1] [2]
  • Documented the replacement of a custom iolist_length function with the standard erlang:iolist_size/1 BIF for code quality improvement, and added related test coverage. (TODO.md)

…add delay in graceful_close for proper buffer drainage
…s and reduce memory allocation; add delays for socket buffer management
…ent closure behavior and add Connection: close header
…racking; increase wait times for socket buffer management
…erbosity; improve error handling in try_send functions
…d accepts_gzip functions for improved file serving
…ing for content length in create_reply function
…g sends; remove redundant logging in create_reply and serve_file functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants