Skip to content

pasimako/rust-colors-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-colors-api

A minimal Rust API server built with Axum.

This repository contains the code built step by step in my tutorial at ubuverse.com/introduction-to-restful-api-development-with-rust-for-nodejs-developers/.

Running

cargo run

Testing

cargo test

Endpoints

GET /colors

Returns all colors.

Response

{
  "colors": ["RED", "GREEN", "BLUE"]
}

POST /colors

Adds a new color.

Request

{
  "color": "BLUE"
}

Response

{
  "colors": ["BLUE"]
}

License

GPL-3.0

About

Introduction to RESTful API Development with Rust for Node.js Developers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages