Skip to content

Instantly share code, notes, and snippets.

View qweliant's full-sized avatar
🧟
A zombie, philosophically speaking

Qwelian D Tanner qweliant

🧟
A zombie, philosophically speaking
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
# STAGE 1 - build the react app
# set the base image to build from
# This is the application image from which all other subsequent
# applications run. Alpine Linux is a security-oriented, lightweight #(~5Mb) Linux distribution.
FROM node:alpine as build
# set working directory
# this is the working folder in the container from which the app. # will be running from
WORKDIR /app
# add the node_modules folder to $PATH
ENV PATH /app/node_modules/.bin:$PATH
version: "3.8"
services:
go:
env_file:
- .env
build:
context: .
dockerfile: ./go/Dockerfile
ports: ["8000:8000"]
func main() {
r := gin.Default()
r.POST("/api/info", info)
func main() {
r := gin.Default()
mainPage := "../html/index.html"
oauthPage := "../html/oauth-response.html"
r.LoadHTMLFiles(mainPage, oauthPage)
r.Static("/static", "../static")
r.POST("/api/info", info)
r.GET("/", func(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", gin.H{})
var (
// set constants from env
PLAID_CLIENT_ID = os.Getenv("PLAID_CLIENT_ID")
PLAID_SECRET = os.Getenv("PLAID_SECRET")
PLAID_ENV = os.Getenv("PLAID_ENV")
PLAID_PRODUCTS = os.Getenv("PLAID_PRODUCTS")
PLAID_COUNTRY_CODES = os.Getenv("PLAID_COUNTRY_CODES")
PLAID_REDIRECT_URI = os.Getenv("PLAID_REDIRECT_URI")
APP_PORT = os.Getenv("APP_PORT")
)
var (
PLAID_CLIENT_ID = ""
PLAID_SECRET = ""
PLAID_ENV = ""
PLAID_PRODUCTS = ""
PLAID_COUNTRY_CODES = ""
PLAID_REDIRECT_URI = ""
APP_PORT = ""
client *plaid.Client = nil
)
@qweliant
qweliant / .env
Last active January 21, 2021 22:19
# Get your Plaid API keys from the dashboard: https://dashboard.plaid.com/account/keys
PLAID_CLIENT_ID=CLIENT ID
PLAID_SECRET=SANDBOX SECRET
# Use 'sandbox' to test with fake credentials in Plaid's Sandbox environment
# Use 'development' to test with real credentials while developing
# Use 'production' to go live with real users
PLAID_ENV=sandbox
# PLAID_PRODUCTS is a comma-separated list of products to use when
# initializing Link, e.g. PLAID_PRODUCTS=auth,transactions.
# see https://plaid.com/docs/api/tokens/#create-a-link_token for a complete list