A serverless app designed to serve a contactform, running on ZEIT
.
├── .env_template <-- A template file with the environment variables needed for the function
├── .gitignore <-- Ignoring the things you do not want in git
├── go.mod
├── go.sum
├── index_test.go <-- Tests for the function code
├── index.go <-- The actual function code
├── LICENSE <-- The license file
├── Makefile <-- Makefile to build and deploy
├── now.json <-- Deployment descriptor for ZEIT
└── README.md <-- This file :)
You can get the sources for this project by simply running
go get -u github.com/retgits/serverless-contactform/...
Update the secrets by running
make update-secrets
This command will delete and recreate the secrets. The secrets used are:
- RECAPTCHA_SECRET: The reCAPTCHA secret token you can get from the Server side integration step in Google reCAPTCHA
- EMAIL_ADDRESS: The email address to send data to (like [email protected])
- EMAIL_PASSWORD: The password needed to log in to the SMTP server
- SMTP_SERVER: The SMTP server
- SMTP_PORT: The SMTP server port
Deploy the app by running
make deploy