My new course Building a Production-Ready Service in Go is almost complete - try it out and let me know what you think!


Creating our First Endpoint

December 28, 2021

Course Instructor: Elliot Forbes

Hey Gophers! My name is Elliot and I'm the creator of TutorialEdge and I've been working with Go systems for roughly 5 years now.

Twitter: @Elliot_f

package main

import (

func Handler(request events.APIGatewayV2HTTPRequest) (events.APIGatewayProxyResponse, error) {
	return events.APIGatewayProxyResponse{
		Body:       "I'm Alive",
		StatusCode: 200,
	}, nil

func main() {

import * as sst from "@serverless-stack/resources";

export default class MyStack extends sst.Stack {
  constructor(scope, id, props) {
    super(scope, id, props);

    // Create a HTTP API
    const api = new sst.Api(this, "Api", {
      routes: {
        "GET /api/health": "cmd/health"

    // Show the endpoint in the output
      "ApiEndpoint": api.url,
$ npx run start
$ curl
Hello, World! Your request was received at 25/Oct/2021:17:48:38 +0000.%