You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started a new project using the API template and added a new model and controller. Now I wanted to start the app with cargo loco start. I tried to test the connection with curl localhost:5150/_ping -v --max-time 10 and it timed out. No other route works, it always times out.
To Reproduce
loco new
Rest API template
postgres database
cargo loco generate model projects name:string! description:string
I couldn’t reproduce the issue you mentioned. Here are the steps I followed:
Created a new project:
❯ loco new
✔ ❯ App name? · myapp
✔ ❯ What would you like to build? · Rest API (with DB and user auth)
✔ ❯ Select a DB Provider · Postgres
✔ ❯ Select your background worker type · Async (in-process tokio async task)
Generated the model:
cargo loco generate model projects name:string! description:string
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.70s
Running `target/debug/myapp-cli generate model projects 'name:string!'''description:string'`added: "migration/src/m20250126_083848_projects.rs"...... Done.2025-01-26T08:38:59.723544Z WARN app: loco_rs::boot: environment=development* Migration for `projects` added! You can now apply it with `$ cargo loco db migrate`.* A test for model `Projects` was added. Run with `cargo test`.* *
Then, I added the index function to the controllers, and everything worked as expected.
Could you share a repository or code snippet so I can take a closer look?
Description
I've started a new project using the API template and added a new model and controller. Now I wanted to start the app with
cargo loco start
. I tried to test the connection withcurl localhost:5150/_ping -v --max-time 10
and it timed out. No other route works, it always times out.To Reproduce
loco new
cargo loco generate model projects name:string! description:string
cargo loco db migrate
cargo loco db enity
cargo loco generate controller projects --api
index
function:cargo loco start
Expected Behavior
I expect loco to give me ANY response.
Environment:
Additional Context
I also tried other ports and tried to reach the database via the playground which succeeded. It seems to be an issue with the server.
The text was updated successfully, but these errors were encountered: