sst / ion

SST v3
https://sst.dev
MIT License
1.88k stars 221 forks source link

Rust Example using https://loco.rs #1136

Open rvcas opened 3 days ago

rvcas commented 3 days ago

I am almost there with a rust example using the "rails" of rust.

The only issue I am having at this point is the domain mapping keeps returning a 502, I'm not exactly sure what the issue is atm. I believe the application is configured correctly but maybe I'm wrong.

Also, I think to have the just dev command work, I will need to setup a bastion server but I haven't gotten around to playing with that yet.

@jondot this is what I DM'd you about the other day. I think this would be a good example and blog post for the loco community, any insight into what I might be misconfiguring would be awesome.

last attempted with sst v3.1.32

jondot commented 2 days ago

Thanks for pinging me here! I'm having a look 👍

jondot commented 2 days ago

I'm not sure this is a subdomain mapping causing the issue, but it may be something with how the app starts and its environment. Do you have some logs you can share here?

rvcas commented 2 days ago

@jondot so according to the logs I get the typical print out of all the routes, then the usual loco ascii art, and finally listening on localhost:5150



September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563366Z","level":"INFO","fields":{"message":"[POST] /auth/reset"},"target":"loco_rs::controller::app_routes"} | - | -
-- | -- | -- | --
September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563378Z","level":"INFO","fields":{"message":"[GET] /user/current"},"target":"loco_rs::controller::app_routes"} | - | -
September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563406Z","level":"INFO","fields":{"message":"[Middleware] +etag"},"target":"loco_rs::controller::app_routes"} | - | -
September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563476Z","level":"INFO","fields":{"message":"[Middleware] +limit payload","data":"5mb"},"target":"loco_rs::controller::app_routes"} | - | -
September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563578Z","level":"INFO","fields":{"message":"[Middleware] +log trace id"},"target":"loco_rs::controller::app_routes"} | - | -
September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563774Z","level":"INFO","fields":{"message":"[Middleware] +secure headers"},"target":"loco_rs::controller::app_routes"} | - | -
September 25, 2024 at 17:46 (UTC-4:00) | {"timestamp":"2024-09-25T21:46:52.563815Z","level":"INFO","fields":{"message":"[Middleware] +request id"},"target":"loco_rs::controller::app_routes"} | - | -
September 25, 2024 at 17:46 (UTC-4:00) |   | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▄ ▀ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▀ ▄ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▄ ▀ ▄ ▄ ▄▀ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▄ ▀▄▄ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▄ ▀ ▀ ▀▄▀█▄ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▀█▄ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▀▀█ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ██████ █████ ███ █████ ███ █████ ███ ▀█ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ██████ █████ ███ █████ ▀▀▀ █████ ███ ▄█▄ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ██████ █████ ███ █████ █████ ███ ████▄ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ██████ █████ ███ █████ ▄▄▄ █████ ███ █████ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ██████ █████ ███ ████ ███ █████ ███ ████▀ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▀▀▀██▄ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ██▀ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | - | -
September 25, 2024 at 17:46 (UTC-4:00) | https://loco.rs | - | -
September 25, 2024 at 17:46 (UTC-4:00) |   | - | -
September 25, 2024 at 17:46 (UTC-4:00) | environment: development | - | -
September 25, 2024 at 17:46 (UTC-4:00) | logger: info | - | -
September 25, 2024 at 17:46 (UTC-4:00) | compilation: release | - | -
September 25, 2024 at 17:46 (UTC-4:00) | modes: server | - | -
September 25, 2024 at 17:46 (UTC-4:00) |   | - | -
September 25, 2024 at 17:46 (UTC-4:00) | listening on localhost:5150