Move demo app to example/ directory - #10
Merged
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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 ownrebar.config. - Keep integration tests compiling the demo handler module via
extra_src_dirsin thetestprofile. - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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