This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'webrick' | |
| require 'json' | |
| server = WEBrick::HTTPServer.new Port: 9000 | |
| server.mount_proc '/' do |request, response| | |
| response.body = 'Hello World from WEBrick' | |
| end | |
| server.mount_proc '/ping' do |request, response| | |
| response.body = JSON.generate({pong: true}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "sort" | |
| "strconv" | |
| "strings" |
OlderNewer