Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josemyduarte/netlifydemo-forkmatch
Demo app using Netlify serverless capabilities
https://github.com/josemyduarte/netlifydemo-forkmatch
golang netlify serverless
Last synced: 19 days ago
JSON representation
Demo app using Netlify serverless capabilities
- Host: GitHub
- URL: https://github.com/josemyduarte/netlifydemo-forkmatch
- Owner: JosemyDuarte
- Created: 2023-08-17T10:42:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-22T16:07:15.000Z (over 1 year ago)
- Last Synced: 2024-04-21T00:21:16.227Z (10 months ago)
- Topics: golang, netlify, serverless
- Language: Go
- Homepage: https://fancy-frangollo-11ad48.netlify.app/.netlify/functions/ForkMatch
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ForkMatch
ForkMatch is a demo app with the required code to deploy a Golang endpoint on [Netlify](https://www.netlify.com/) using [Netlify Functions](https://www.netlify.com/products/functions/).
## Deploy
To deploy the app, you need to have a [Netlify](https://www.netlify.com/) account and a [GitHub](https://github.com/) account.
Make sure to follow the [required steps](https://www.netlify.com/blog/2016/09/29/a-step-by-step-guide-deploying-on-netlify/) to fork and deploy on your own account.Define the following environment variables on your Netlify account:
```bash
ENVIRONMENT=aws
```This is because under the hood, Netlify uses [AWS Lambda](https://aws.amazon.com/lambda/) to run their serverless functions, so we need to implement our
code to be compatible with AWS Lambda.## Run locally
To run the app locally, you need to have [Go](https://golang.org/) and [docker](https://www.docker.com/) installed.
```bash
make docker/run
```## Endpoints
If you are running locally, the base URL is `http://localhost:8080` and if you are using Netlify, the base URL is `https://.netlify.com/.netlify/functions/ForkMatch`.
Take a look at `app.go` to see the available endpoints. Keep in mind that there are different "App" depending on the environment. Meaning that the `App` for AWS Lambda is different than the `App` for running locally.