🚀 Get 25% off access to all my premium courses - use discount code FUNCMAIN at checkout - view the pricing page now!


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 https://9d27htf1fk.execute-api.us-east-1.amazonaws.com/
Hello, World! Your request was received at 25/Oct/2021:17:48:38 +0000.%