Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmoiron/contact-form
server that implements an email contact form for an otherwise static website
https://github.com/jmoiron/contact-form
Last synced: about 2 months ago
JSON representation
server that implements an email contact form for an otherwise static website
- Host: GitHub
- URL: https://github.com/jmoiron/contact-form
- Owner: jmoiron
- License: mit
- Created: 2015-03-22T23:31:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-23T19:14:15.000Z (over 9 years ago)
- Last Synced: 2024-08-01T12:23:37.013Z (4 months ago)
- Language: Go
- Homepage:
- Size: 133 KB
- Stars: 11
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - jmoiron/contact-form - server that implements an email contact form for an otherwise static website (others)
README
# contact-form
[![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/jmoiron/contact-form/master/LICENSE)
A simple stand-alone web server which implements a contact form on an
otherwise static website.Contains code from [Alex Edward's Form Validation blog post](http://www.alexedwards.net/blog/form-validation-and-processing)
which is [licensed under the MIT
licence](https://twitter.com/ajmedwards/status/580082588879970305).## usage
If you run `contact-form` in a directory, it will serve up everything in that
directory as a static file in the same way a server like `nginx` or `apache`
would, defaulting to `index.html` when a "directory" is accessed.It also sets up a listener on `/contact/`, which does a few things:
* You can `POST` with `email`, `subject`, and `message` to attempt to send
an email. This returns a json message `{"success": true}` on success and
`{"success": false, "error": "