This project is purposed to give some base for landing page serving.
BSD-2-Clause. Please see LICENSE file
-
main.go - main itself
-
.env.example - example .env file for exporting enviroment variables (please see below)
-
/comingsoon/ - coming soon page for serving. It may use only as example of working
For using this code you should copy .env.example as .env and fill following variables:
-
STATIC_PATH - path there you store your landing page. If you have no suitable landing page you can use proposed comingsoon page with path ./comingsoon/
-
PORT - port on which will expose a landing page. Usually 80
-
UPLOAD_PATH - path for uploads files. Don't forget create this folder!
-
SENDGRID_API_KEY - it's very obiviously
-
EMAIL_ADDRESS - address which wil be use as FROM and TO in emails
-
DEBUG_LEVEL - debug level of the Iris framework. Equals to debug as default
As a peace a cake:
go get
go run main.go
.
The app has only two routes:
-
/ - at this route serves static content which placed at STATIC_PATH variable
-
/createlead - route for post data from form (values and file). Please check comingsoon/index.html for get some information about it.
- Files in UPLOAD_PATH should be erased manually or by cron events
-
tech questions: Danil Borchevkin
-
administrative questions: Danil Borchevkin