fasthttp-example

command module
v0.0.0-...-2ef9393 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 7 Imported by: 0

README

KintoHub FastHttp Example

Overview

FastHttp is a HTTP server that is up to 10 times faster than net/http in Go. It can be built easily for microservice on KintoHub!

Live Example

About KintoHub:

KintoHub aligns teams to ship & operate cloud native apps with ease. Learn More

Deployment

  1. Apply this template to your Github
  2. Create a Microservice Block on KintoHub
  3. Connect your GithubApp to KintoHub and select the Repository you just generated on your account.
  4. Set the name of your kinto block
  5. Choose Go as the language and 1.11.4 as the version
  6. Set the Build Command as go build -o main .
  7. Set the Start Command as ./main
  8. Set the Port as 80

You're now good to go! Click Create Microservice. Now click Build Latest Commit

Once complete, Click Add to Project

Follow the instruction to create a new project. Once created, you should be able to access your API endpoints.

Installation & Local Run

Ensure you have go 1.11 or higher.

go run .

Usage

Optional Environment Variables

Default value = Hello, please refer to the .env-example file

GREETING=Hi
API Call

Local:

curl -X GET http://localhost/hello/world

On KintoHub:

curl -X GET http://<EnvironmentHostName>/<KintoBlockName>/hello/world

Please refer to Accessing API Endpoints for the setup instruction

Try this Live Example !

Response
{
  "message": "Hello world"
}

What's Next?

You can do a lot with KintoHub and your deployed application. Some helpful links for next steps that you may consider with this project.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL