42 lines
1003 B
Markdown
42 lines
1003 B
Markdown
# Tinyforms
|
|
|
|
Form endpoint that allows to push data from a static HTML form directly into a google spreadsheet.
|
|
|
|
## Installation
|
|
|
|
### Requirements
|
|
|
|
* ruby 2.6 or higher
|
|
* PostgreSQL
|
|
|
|
### Installation
|
|
|
|
Install gem dependencies and setup the database:
|
|
|
|
```bash
|
|
$ bundle install
|
|
$ rails db:setup
|
|
```
|
|
|
|
### Configuration
|
|
|
|
To use the application the Google API client needs to be configured using the following environment variables:
|
|
|
|
* GOOGLE_CLIENT_ID
|
|
* GOOGLE_PROJECT_ID
|
|
* GOOGLE_CLIENT_SECRET
|
|
|
|
You can get those from the [Google APIs Dashboard](https://console.developers.google.com/apis/dashboard)
|
|
|
|
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
|
|
|
|
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)
|