tinyforms/README.md

42 lines
1003 B
Markdown
Raw Permalink Normal View History

2020-04-06 09:20:39 +00:00
# Tinyforms
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
Form endpoint that allows to push data from a static HTML form directly into a google spreadsheet.
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
## Installation
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
### Requirements
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
* ruby 2.6 or higher
* PostgreSQL
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
### Installation
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
Install gem dependencies and setup the database:
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
```bash
$ bundle install
$ rails db:setup
```
2020-04-05 21:29:32 +00:00
2020-04-06 09:21:20 +00:00
### Configuration
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
To use the application the Google API client needs to be configured using the following environment variables:
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
* GOOGLE_CLIENT_ID
* GOOGLE_PROJECT_ID
* GOOGLE_CLIENT_SECRET
2020-04-05 21:29:32 +00:00
2020-04-06 09:20:39 +00:00
You can get those from the [Google APIs Dashboard](https://console.developers.google.com/apis/dashboard)
2020-04-09 14:06:08 +00:00
Additionally an encryption master key needs to be configured. [lockbox](https://github.com/ankane/lockbox) is used to encrypt sensitive data (e.g. access_token) at rest.
* LOCKBOX_MASTER_KEY
2020-04-06 09:20:39 +00:00
Store those in a `.env` file; see `env.example` for an example.
### Run the application
$ rails server # loads the configruation from the .env file
Open [localhost:3000](http://localhost:3000)