occlum/demos/golang/web_server
2024-06-13 12:00:13 +08:00
..
.gitignore Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
build.sh [demos] Fix golang webserver build error 2024-06-13 12:00:13 +08:00
README.md [demos] Fix golang webserver build error 2024-06-13 12:00:13 +08:00
run_golang_on_occlum.sh Update demos to enable EDMM features 2023-11-07 09:26:20 +08:00
web_server.go Add a sample of Golang gRPC client/server programs 2020-09-02 17:06:09 +08:00
web_server.yaml Update go web_server demo with bom file 2021-09-26 16:34:52 +08:00

Use Golang with Occlum

This project demonstrates how Occlum enables Golang programs running in SGX enclaves, the demo program is a HTTP web server based on a widely used web framework(Gin) for Go.

Step 1: Install Gin and build Golang web server with occlum-go

./build.sh

Step 2: You can run the web server demo on Occlum via

./run_golang_on_occlum.sh

The HTTP web server should now start to listen on port 8090 and serve HTTP requests.

Step 3: To check whether the HTTP server works, run

curl http://127.0.0.1:8090/ping

in another terminal, and get the response {"message":"pong"}.