Created
December 17, 2015 20:59
-
-
Save mantzas/e074420afe0dd5ed3d71 to your computer and use it in GitHub Desktop.
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 ( | |
common_http "bitusion.com/TradingSimulator/common/net/http" | |
"bitusion.com/TradingSimulator/services/order_command_service/handlers" | |
log "github.com/Sirupsen/logrus" | |
"net/http" | |
_ "net/http/pprof" | |
"os" | |
) | |
func init() { | |
// Log as JSON instead of the default ASCII formatter. | |
log.SetFormatter(&log.TextFormatter{}) | |
// Output to stderr instead of stdout, could also be a file. | |
log.SetOutput(os.Stderr) | |
// Only log the warning severity or above. | |
log.SetLevel(log.DebugLevel) | |
} | |
func main() { | |
http.Handle("/", common_http.DefaultPostMiddleware(handlers.CreateOrderHandler())) | |
log.Fatal(http.ListenAndServe(":8080", nil)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment