Git Product home page Git Product logo

devbcn-workshop's People

Contributors

nopenoshishi avatar nozomi-iida avatar piny4man avatar program247365 avatar robertohuertasm avatar robjtede avatar tkeiyama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

devbcn-workshop's Issues

Chapter 2.5 Working with a Database: Injecting the database connection - fails accourding to trait bound `shuttle_shared_db::Postgres: ResourceInputBuilder` is not satisfied

Hello :)

IΒ΄m sorry for opening up a issue, but i canΒ΄t help me out.

As I was following the instructions from your Tutorial i ran into this error. I checked it multiple times and can say i exactly followed the instructions.

error[E0277]: the trait bound shuttle_shared_db::Postgres: ResourceInputBuilderis not satisfied --> api/shuttle/src/main.rs:11:7 #[shuttle_shared_db::Postgres()] pool: sqlx::PgPool, ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the traitResourceInputBuilderis not implemented forshuttle_shared_db::Postgres`

error[E0599]: no function or associated item named default found for struct shuttle_shared_db::Postgres in the current scope
--> api/shuttle/src/main.rs:9:1

#[shuttle_runtime::main]
|^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in Postgres
`

As an absolute beginner i would be very thankfull for a solution to this problem, i canΒ΄t figure out myself.

Unfinished section in workshop guide - Frontend: 3.4.3

Under the App Effects section, immediately before the transition into the Film Modal subsection, there's a seemingly unfinished paragraph starting with "Sure, here's a revised version with a more formal tone: " just below the first code snippet on the page.

Unable to compile / shuttle run with database

Adding the line
#[shuttle_shared_db::Postgres()] pool: sqlx::PgPool,
into
`async fn actix_web(

) -> ShuttleActixWeb<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
let config = move |cfg: &mut ServiceConfig| {
cfg.service(hello_world);
};`
in main.rs in api > shuttle > src breaks the compile with:

no function or associated item named new found for struct shuttle_shared_db::Postgres in the current scope
items from traits can only be used if the trait is in scope rustc

Unit testing relies of not using handler macros without explanation

Thanks for building this workshop, it's a great way to try out new technologies.

I came across an issue with the unit testing section. I decided not to abandon macros at the end of configure section, because why would you?

It turns out Actix unit testing does not work with macro-enhanced handlers as they are converted to a struct and not left as a function.

It would be useful to motivate the switch from macros to raw handlers. At the moment its presented as just something you could do for fun.

Further, the code in the repo (check_health) does not match the document coded (health).

(Did I miss something?)

how not to use shuttle?

Sorry for opening an issue for a question, but the discussions are not available for this repo.

This workshop is awesome. But I don't want to be locked into using shuttle. I just want to run it on my own server.

It is mentioned somewhere that this workshop was updated to use shuttle. However, I think that being able to run it on your own server is more imoprtant than requiring people to use a 3rd party service to deploy the app.
Is there any way that this workshop includes a separate chapter that explains how not to use shuttle?

Image of final demo?

Would be great to see an image in the beginning of what the final demo looks like.

for users of Jetbrains IDEs: a HTTP Client script corresponding to `api.http`

What it is good for

I have taken the vscode testing script file api.http and adapted it to a script for the HTTP Client, which is a free plugin for IDEs from Jetbrains.

It features (grand word, isn't it)

  • distinct environments (local dev, remote shuttle)
  • asserting reponses' status codes
  • tracking of film_id of a newly created film

Where to find the script

There are two files needed. You can find both of them in this gist: https://gist.github.com/bronsen/509f5087b2b463d0268750bd6f236d87

Please make use of them! πŸ˜„

Where you could put the script

I have put them in api/lib/tests, alongside health.rs. However, you can put them whereever you like, as long as you keep those two files (rest-api.http, http-client.env.json) together.

How to use the script

  1. Open rest-api.http in your Jetbrains IDE where you have installed the HTTP Client plugin.
  2. At the top of the file tab, select the appropriate environment from Run with:
  3. Click the green double arrow
  4. Observe the results

How the script works

Just like the original api.http file, it's a bunch of http calls (GET, POST, etc) seperated by markers (###). There are placeholders (for example {{host}}), that are filled from the corresponding env file.

GET {{host}}/health HTTP/1.1

HTTP Client also has so-called Response handlers, which are javascript and can access the response object of the previous call, and can also set variables. One such variable is film_id that is used to fill the {{film_id}} placeholder.

#shortened example
POST {{host}}/v1/films 

{"some": "data"}

> {%
client.global.set("film_id", response.body["id"]);
# from now on we can use {{film_id}} in the script
%}

I hope this is useful to others, who follow that exhaustive tutorial πŸ˜… πŸ‘πŸΎ


cargo shuttle deploy - undiagnosable error?

I am working through the workshop and am at Section 2.8 - Deploying the database. cargo shuttle run works great but cargo shuttle deploy yields the following error:

Error: failed to parse a successful response

Caused by:
    UUID parsing failed: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `H` at 3 at line 1 column 86

And I have not found anything more helpful needed to diagnose the issue or even determine which file has an issue. .

Any suggestions for how to find diagnostic info?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.