posit-dev / posit-dev/shinylive

External files or multifile app does not work

Open
#77 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
251
Forks
25
Avg merge
19m
Merged PRs (30d)
2

Description

Hi. Just started testing shinylive and I have a quick question. I need either a small json file for my app.py or an external module (not pip install just a local wordlist.py file). When I wanted to use shinylive for my app (and files) inside app/ folder and I want to export the outputs to docs/ folder. I use the following command.

shinylive export app docs

When I serve it on the localhost with python3 -m http.server --directory docs --bind localhost 8008 I get the following result.

Screenshot 2023-11-13 at 14 36 09

I know it can be done due to this example: https://shinylive.io/py/examples/#regularization

Perhaps I missed a documentation for multi-file shinylive apps. I can do a workaround with a bloated app.py but knowing how to work with multiple files will be incredible.

Thanks for such an awesome package. It will get better and better I presume.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shinylive export app docs command and compare its behavior with the linked regularization example. Document how an app in app/ can include a local JSON file or module such as wordlist.py, and how the exported output in docs/ should be served.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.