-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCheat_Sheet.txt
24 lines (19 loc) · 958 Bytes
/
Cheat_Sheet.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Build the program:
go build
# Run the program
./go-pets
# Prerequisites:
1. Need a Google Cloud Project with a Datastore Datbase created
2. Set the GOOGLE_CLOUD_PROJECT environment variable equal to your project ID
export GOOGLE_CLOUD_PROJECT=your-project-id-here
3. Need to create a Service Account with at least Datastore access and create and download a service account key.
4. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to your key path
export GOOGLE_APPLICATION_CREDENTIALS=~/your-key-name.json
# Use Fresh to automatically rebuild project when there are changes
# Run Fresh from the application's folder
go get github.com/pilu/fresh
fresh
# Build with Google Cloud Build
gcloud builds submit --tag=gcr.io/YOUR-PROJECT-ID-HERE/go-pets:v1.0 .
# To Deploy, you must set the environment variable: GOOGLE_CLOUD_PROJECT equal to your project ID.
# You also need a Datastore database in the project where you want to run the program.