Skip to content

A high performance echo server that echoes back an HTTP response with the content received over the TCP connection.

Notifications You must be signed in to change notification settings

Anishmourya/rust-echo-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust High Performance Echo Server

A high performance echo server that echoes back an HTTP response with the content received over the TCP connection.

Usage

Docker build

$ docker build -t anishdhanka/rust-echo-server -f docker/Dockerfile .

Docker Run

$ docker run -d -p 3000:3000 --restart=always --name rust-echo-server -td anishdhanka/rust-echo-server

To install dependencies

$ cargo install --path .

To check dependencies

$ cargo check

To build project

$ cargo build

To start the server run:

$ cargo run 

Simple CURL request

$ curl http://localhost:3000/

Post CURL request for echo

$ curl --location --request POST 'localhost:3000/echo' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  	"name": "Anish kumar Dhanka",
  	"email": "anish.mourya5@gmail.com"
  }'

About

A high performance echo server that echoes back an HTTP response with the content received over the TCP connection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published