Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sonyarianto/karatan

Template/sample/skeleton/boilerplate web framework implemented in Rust (Actix Web)
https://github.com/sonyarianto/karatan

backend rust web-api

Last synced: 26 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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 <> and contributors.