Skip to content

Template/sample/skeleton/boilerplate web framework implemented in Rust (Actix Web)

License

Notifications You must be signed in to change notification settings

sonyarianto/karatan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karatan

Karatan is a template/sample/skeleton/boilerplate web framework implemented in Rust using Actix Web. Initially to makes my life easy. It contains simple sample to start your own backend system. Is it performant? I am not sure since I am still learning Rust as well.

Requirements

  • Rust

How to run?

  • Clone the repo and go to the project directory.
  • Type cargo build and then cargo run to run the program.
  • It will run the web server on port 8000, try at http://localhost:8000.
  • Then you can try several available sample routes below while reading the source code.

Available sample routes

  • (GET) / => Return string "Hello, World!"
  • (GET) /about => Return string "This is about page"
  • (POST) /upload => Imaginary path for POST end-point, still unimplemented
  • (GET) /json => Return JSON data from static string
  • (GET) /{name}/age/{age} => Return string with name and age from the URL
  • (GET) /external/api/1 => Return JSON data from external API (https://jsonplaceholder.typicode.com/todos)
  • (GET) /external/api/2 => Return JSON data from external hidden API with a bearer token

Learn the code

  • The entry point file is on src/main.rs, for now that's single file and all logic is all there, no include files for easy to learn.

License

MIT

Copyright © 2024 Sony Arianto Kurniawan <sony@sony-ak.com> and contributors.

About

Template/sample/skeleton/boilerplate web framework implemented in Rust (Actix Web)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published