Skip to content

Move demo app to example/ directory - #10

Merged
andreashasse merged 2 commits into
mainfrom
claude/move-demo-to-examples-fSxvv
Mar 26, 2026
Merged

andreashasse merged 2 commits into
mainfrom
claude/move-demo-to-examples-fSxvv

Conversation

@andreashasse

Copy link
Copy Markdown
Owner

The demo handlers (elli_openapi_demo, user_handler) and demo.escript were
mixed into src/ alongside the library code. This separates them into a
standalone example/ app with its own rebar.config (path dep on parent).

Tests still compile elli_openapi_demo via extra_src_dirs in the test profile.
CI now also compiles the example app. README updated to guide users to example/.

https://claude.ai/code/session_018fWKyeGN93ZDdLR3PyW5Yj

claude added 2 commits March 23, 2026 09:08
The demo handlers (elli_openapi_demo, user_handler) and demo.escript were
mixed into src/ alongside the library code. This separates them into a
standalone example/ app with its own rebar.config (path dep on parent).

Tests still compile elli_openapi_demo via extra_src_dirs in the test profile.
CI now also compiles the example app. README updated to guide users to example/.

https://claude.ai/code/session_018fWKyeGN93ZDdLR3PyW5Yj
cd example && rebar3 compile triggers standalone dep resolution which fails
in the CI network environment (rebar.lock contains a git dep that can't be
fetched). Use rebar3 as test compile from root instead, which compiles
example/src via extra_src_dirs in the test profile — same verification,
no separate network access needed.

https://claude.ai/code/session_018fWKyeGN93ZDdLR3PyW5Yj

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves the repository’s runnable demo code out of the main library src/ tree into a standalone example/ application, and updates build/test wiring and docs accordingly.

Changes:

  • Remove the root-level demo shell configuration and move demo handlers + script into example/ with its own rebar.config.
  • Keep integration tests compiling the demo handler module via extra_src_dirs in the test profile.
  • Update CI and README to reflect the new example location and usage.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rebar.config Removes root demo shell config; adds example/src to test profile compilation; updates Hank ignore patterns.
example/src/user_handler.erl Adds example “user” handler module (demo-only).
example/src/elli_openapi_demo.erl Adds the primary example OpenAPI handler implementations used by tests and the example app.
example/src/demo.app.src Defines a minimal OTP application resource for the example app.
example/rebar.config Adds standalone build config for the example app (path dep on parent).
example/demo.escript Adds runnable script used by rebar3 shell in the example app.
demo.escript Removes the old root-level demo script.
README.md Updates documentation to point users to example/ and adds run instructions + endpoints.
.github/workflows/ci.yml Adds a CI step intended to compile the example code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
@andreashasse
andreashasse merged commit c25721c into main Mar 26, 2026
6 checks passed
@andreashasse
andreashasse deleted the claude/move-demo-to-examples-fSxvv branch March 27, 2026 05:35
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.

3 participants