Skip to content

Loco app documentation

Matthjass13 edited this page Mar 1, 2026 · 2 revisions

The Loco folder contains a web app created with the loco framework.
It is a CRUD app to manage differents posts and comments.
It uses SQLLite for the data management.

How to use the app

Preparations

  • Go to the locoapp folder
  • Install loco on your side with :
  • cargo install loco
  • cargo install sea-orm-cli
  • Launch the command cargo loco start

Usage

  • You can access the app with localhost:5150/api/articles
  • To use curl command, install git bash and run the commands in there
  • Here are the curl command you can use :

Add a new item

curl -X POST -H "Content-Type: application/json" -d '{ "title": "anotherTitle", "content": "anotherContent" }' localhost:5150/api/articles

Edit an item (doesn't work now)

curl -X PUT -H "Content-Type: application/json" -d '{ "title": "Updated Title", "content": "Updated content" }' http://localhost:5150/api/articles/{itemId}

Delete an item

curl -X DELETE http://localhost:5150/api/articles/{itemId}

What does it demonstrate ?

Not much

Clone this wiki locally