Discover Packages
github.com/meslater1030/sole-mates
command
module
Version:
v0.0.0-...-2d47cba
Opens a new window with list of versions in this module.
Published: Apr 7, 2020
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
sole-mates
This is an application to match people who need just one shoe or different sized shoes to their opposite.
Local Development
Install dependencies with go get .
Build the API binary with go build service.go
this will output a binary called service
Set an environment variable called SQL_DATASOURCE_NAME with the value host=sole-mates dbname=sole-mates user=user password=password sslmode=disable
You can find the username and password for the sole-mates db in 1Password
Run the service with ./service
. You can now access the API at localhost:3000
Local Debugging with VSCode
Create the following launch.json
file in the .vscode
folder in the root of your project (replace username and password):
{
"version": "0.2.0",
"configurations": [
{
"name": "API",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceRoot}/service",
"env": {
"SQL_DATASOURCE_NAME": "host=sole-mates dbname=sole-mates user=user password=password sslmode=disable"
},
"args": ["service"],
"preLaunchTask": "buildAPI"
}
]
}
Create the following tasks.json
file in the .vscode
folder in the root of your project:
{
"version": "2.0.0",
"tasks": [
{
"label": "buildAPI",
"type": "shell",
"command": "go build service.go",
}
]
}
You can now debug locally using the debug tab in VS Code.
Connecting to gcloud SDK
Install the Google Cloud SDK
On gcloud init
choose sole-mates-273421
as the project
Connecting to the database
You can connect to the database in one of two ways.
Log into console.cloud.google.com, go to SQL, find the sole-mates database and connect using the Cloud Shell
Find the client-cert, client-key and server-ca files in 1Password and use them to set up an SSL connection with a client such as PgAdmin. Hostname, port, and username can all be found in the cloud console.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.