Skip to content

lmammino/trying-axum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trying-axum

Learning the axum Rust web framework live on Twitch.


This repository contains the code we developed while live-streaming on Twitch. We tried to implement a simple web server that can receive and store notes in memory.

The recordings are available on Youtube.

More to come in the next streams, make sure to follow us if you are interested in learning along.

Requirements

Rust and sqlx (cargo install sql)

How to run

Clone the repo and then execute

export DATABASE_URL="sqlite:data.db"
sqlx db create
cargo run

You should now have the server running locally at localhost:3000.

Endpoints

The endpoints developed for now are:

  • POST /note: create a new note (based on the string passed as body payload)
  • GET /note/:id: gets a note by ID

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

About

experiments with Axum Rust web framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published