Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.11 KB

README.md

File metadata and controls

39 lines (32 loc) · 1.11 KB

golly: rest-server - code examples

Overview

Shows how to use the rest-server library and create REST APIs for your applications.

Code Examples


How to run the examples


  1. simple-server
    cd simple-server
    go run server.go
    
    Server Output ----------
    [timestamp] INFO Initiating Turbo
    [timestamp] INFO Registering New Route: /api/v1/healthz
    
    Invoke API ----------
    curl http://localhost:8080/api/v1/healthz
    > server is up and running

Contributing


If you want to contribute any more examples related to turbo, please follow the below guidelines on how to create a module.

  1. Follow the basec contribution guidelines present in Readme
  2. Create the example folder under the rest-server folder.
  3. Steps to create an individual go module
    cd example
    go mod init github.com/nandlabs/golly-samples/rest-server/example
    
    go get oss.nandlabs.io/golly
  4. Now you should be able to create your example