Skip to content
/ jaypi Public

An API? At this time of year, at this time of day, in this part of the Internet, localised entirely within your repository!?

Notifications You must be signed in to change notification settings

rflett/jaypi

Repository files navigation

JAYPI (jay-pee-eye)

Go Build

An API built on Golang for the soon to be JJJ countdown leaderboard app.

Query the live API

Use the Postman collection and create an environment setting the following variables:

  • host=https://api.staging.jaypi.online

Postman tests will handle creating and updating the other variables as requests are made.

Development

  • Go 1.14+
  • Serverless 2.25.2+

You'll also need AWS credentials.

Install the required Go modules with go mod download in the source/ directory.

Deployment

Push to GitHub and the workflow will build and deploy on push to the main branch or via a manual run.


Doing things locally

Set up the required environment variables for local invocation using a .env file.

To deploy locally:

cd source
./build.sh
cd ..
serverless deploy

If you just need to update the function code then you can quickly build and deploy by doing

cd source
go build -ldflags="-s -w" -o bin/deregisterDevice rest/device/deregisterDevice/main.go
cd ..
serverless deploy --function deregisterDevice --force

which only updates the function code and no other config.

About

An API? At this time of year, at this time of day, in this part of the Internet, localised entirely within your repository!?

Resources

Stars

Watchers

Forks

Releases

No releases published