Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/munrocape/staticcontact
Add a contact form to any website - no backend required
https://github.com/munrocape/staticcontact
Last synced: about 2 months ago
JSON representation
Add a contact form to any website - no backend required
- Host: GitHub
- URL: https://github.com/munrocape/staticcontact
- Owner: munrocape
- Created: 2015-01-30T02:52:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-22T02:42:09.000Z (over 9 years ago)
- Last Synced: 2024-06-29T04:33:20.246Z (3 months ago)
- Language: Go
- Homepage:
- Size: 398 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#[Static Contact](http://www.staticcontact.com)
A form forwarder. Static Contact can replace the backend of a contact form so that you can put one on a static site and receive the email in your inbox.
##How-to
Simply change the action and method of a form to be `http://www.staticcontact.com/{your_email}`.
For historical purposes, GET is the default request method. If you wish to be RESTful, POST request methods are also supported.
Here is a sample form:
``` HTML
```
## Roll your own
This guide assumes a [Go environment](http://golang.org/doc/install) is already set up.
###First, clone the repo
```
$ git clone https://github.com/munrocape/staticcontact
```###Next, get the relevant dependencies
```
$ go get github.com/keighl/mandrill
```###Get accounts for services
This requires an account to [Heroku](https://heroku.com), and an API key for [Mandrill](https://mandrillapp.com).Visit those sites and create accounts if you do not yet have them.
###Configure environment variables
`cd` into your local staticcontact directory. The linked buildpack is for revel applications.
```
$ heroku create -b https://github.com/robfig/heroku-buildpack-go-revel.git
$ heroku config:set MANDRILL_KEY={You get this from the Mandrill dashboard}
$ git push heroku master
```Voila! Heroku should print out the URL of the corresponding application. Now, for a given contact form, point the action method to be `{heroku_url}/{your_email}`.