-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update yew-router examples, make them easier to run #1401
Update yew-router examples, make them easier to run #1401
Conversation
@@ -2,7 +2,7 @@ use actix_files::NamedFile; | |||
use actix_web::{get, middleware, web, App, Error, HttpResponse, HttpServer}; | |||
|
|||
// You will need to change this if you use this as a template for your application. | |||
const ASSETS_DIR: &str = "../../static"; | |||
const ASSETS_DIR: &str = "../../_static"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason I renamed this is to make it stand out; static
when it's sorted alphabetically with the rest of the examples, looks like it's the name of an example.
yew-router/examples/README.md
Outdated
|
||
Using the router in its expected use case (not fragment routing) requires that the server respond to requests for | ||
resources at URLs that are routes within the router with the index.html of the application. | ||
|
||
### Running with Python | ||
In applicable directories, launch the `run.sh` shell script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In applicable directories, launch the `run.sh` shell script. | |
In applicable directories, run the `run.sh` shell script. |
yew-router/examples/run_example.sh
Outdated
. \ | ||
&& cd ../_static \ | ||
&& python3 ../start_example_server.py "$INITIAL_URL" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) | |
) | |
Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
@teymour-aldridge thanks for the quick review! |
No problem! One thing is that |
I now see why the examples aren't working with |
Ahh okay. Maybe we can update that again down the road? For the record, this is the error message:
|
That's a lovely error message! |
That makes sense. Do we still need |
The Come to think of it, the @teymour-aldridge Are tests for this project expected to be ran with cargo-web still? I'm under the impression that there has been an effort to migrate them to use something else, but I haven't followed that development super closely. |
Pull request has been modified.
Closed in favour of #1559 |
Description
Tries to make the yew-router examples more self-explanatory, easier to run by adding a
run.sh
in each example which launches a simple Python server. Also noticed that cargo web seems to not be working these days, so replaced those instructions withwasm-pack
.Checklist:
./ci/run_stable_checks.sh