rc-postcard

command module
v0.0.0-...-d6b417a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

README

rc-postcard

Go Report Card

Build and Run

Create an OAuth application at https://www.recurse.com/settings/apps with proper redirect URI (http://localhost:8080/auth for local run). Make sure to set your app's ID, Secret, and Redirect URI in your environmental variables (see .env.example). You can optionally set your own redis host and password.

Create an account on lob.com and set your API keys in your environment variables (see .env.example).

# Load your environmental variables after setting them
# Note: we recommend copying the blank .env.example into a .env file and setting your environmental variables there.
🎨 source .env

🎨 make pg

🎨 psql $PG_DATABASE_URL

Then in psql:

CREATE DATABASE postcard

\c postcard

CREATE TABLE IF NOT EXISTS user_info (recurse_id int UNIQUE NOT NULL, lob_address_id text DEFAULT '', accepts_physical_mail BOOLEAN DEFAULT FALSE, num_credits int DEFAULT 0 NOT NULL, user_name text NOT NULL, user_email text NOT NULL);

Finally, back in your shell


# Run rc-postcard app
🎨 make run

🎉 rc-postcard should now be running at http://localhost:8080

Other tools

Ssh into prod sql after logging into fly

flyctl postgres connect -a rc-postcard-pg

Bonus

  • Validate address
  • Show better preview with iframe

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL