DEV Community

loading...

Discussion on: Practical Rust Web Development - API Rest

werner profile image
Werner Echezuría Author

To be honest, I don't know swift, so I can't make an informed opinion about it.

Thread Thread
saroar profile image
Saroar Khandoker

ok no worry thanks for reply also check this prnt.sc/p0et3l image you don't have still extern crate futures; and you add it so its give us error too

  --> src/main.rs:16:1
   |
16 | extern crate futures;
   | ^^^^^^^^^^^^^^^^^^^^^ can't find crate

Thread Thread
saroar profile image
Saroar Khandoker

also, i follow your tutorial till here Finally goes to http://localhost:8088/products.
but and trying to understand why it not showing :( my products list already debugging more then 2 hours :(

Thread Thread
saroar profile image
Saroar Khandoker

here is my code please check me if you will have
bitbucket.org/Alifdev/ruststore

Thread Thread
werner profile image
Werner Echezuría Author

Hi, sorry for the late response, I was on vacations. Try to follow these tips and tell me if it works.

  1. git checkout v1.1.
  2. diesel setup.
  3. cargo run.
  4. curl http://127.0.0.1:8088/products -H "Content-Type: application/json" -d '{"name": "socks", "stock": 7, "price": 2}
  5. curl http://localhost:8088/products

Tell me if it works.

Thread Thread
saroar profile image
Saroar Khandoker

yes it is working thanks :)