https://github.com/retgits/serverless-contactform
A serverless app to serve the contactform
https://github.com/retgits/serverless-contactform
contact-form lambda serverless zeit-now
Last synced: 11 months ago
JSON representation
A serverless app to serve the contactform
- Host: GitHub
- URL: https://github.com/retgits/serverless-contactform
- Owner: retgits
- License: mit
- Created: 2018-09-09T05:47:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T00:20:28.000Z (over 7 years ago)
- Last Synced: 2025-04-23T19:15:59.330Z (11 months ago)
- Topics: contact-form, lambda, serverless, zeit-now
- Language: Go
- Size: 14.6 KB
- Stars: 15
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# serverless-contactform - A serverless app to serve the contactform
A serverless app designed to serve a contactform, running on [ZEIT](https://zeit.co)
## Layout
```bash
.
├── .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 :)
```
## Installing
### Get the sources
You can get the sources for this project by simply running
```bash
go get -u github.com/retgits/serverless-contactform/...
```
### Update secrets
Update the secrets by running
```bash
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](https://www.google.com/recaptcha)
* EMAIL_ADDRESS: The email address to send data to (like _you@example.com_)
* EMAIL_PASSWORD: The password needed to log in to the SMTP server
* SMTP_SERVER: The SMTP server
* SMTP_PORT: The SMTP server port
### Deploy
Deploy the app by running
```bash
make deploy
```