Servidor web simples implementado com Rust
- Rust 1.63.0 ou superior.
- Cargo 1.63.0 ou superior.
Para executar o projeto utilize o comando:
cargo run
Agora em um navegador, acesse o endereço localhost:7878
e você deve receber um JSON como resposta de sucesso.
Caso queria simular uma atraso no lado do servidor, acesse o endereço localhost:7878/sleep
, você deve receber o mesmo JSON porém com um atraso de 5 segundos.
Qualquer outro endereço deve retornar um HTML.