Skip to content

A simple http server that receives any request and logs it to stdout

Notifications You must be signed in to change notification settings

AhmadElsagheer/simpleserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

simpleserver

A simple http server that receives any request and logs it to stdout.

Installation

go install github.com/ahmadelsagheer/simpleserver@latest

Usage

  1. Start server
simpleserver -p 8000
  1. Send a request
# GET request
curl http://localhost:8000
# POST request
curl -X POST --data '{"hello": "world"}' http://localhost:8000

You can use it with ngrok as follows:

  1. Start both simple and ngrok servers
# terminal 1
simpleserver -p 8000
# terminal 2
ngrok http 8000
  1. Send a request (from any machine)
curl https://<NGROK_FORWARDING_URL>

About

A simple http server that receives any request and logs it to stdout

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages