Skip to content

Go landing bootstrap with serve static, route for post form data and email sending over SendGrid. Based on iris

License

Notifications You must be signed in to change notification settings

futuster/golanding

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golanding

This project is purposed to give some base for landing page serving.

License

BSD-2-Clause. Please see LICENSE file

Who develop this

Danil Borchevkin

What included

  • 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

Bootstrap

Setup .env file

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

Start program

As a peace a cake:

    go get
    go run main.go

.

Routes and data format

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.

Warnings and useful advices

  • Files in UPLOAD_PATH should be erased manually or by cron events

Feedback

About

Go landing bootstrap with serve static, route for post form data and email sending over SendGrid. Based on iris

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 62.5%
  • HTML 15.6%
  • JavaScript 13.7%
  • CSS 8.2%