diff --git a/015_understanding-TCP-servers/06_dial-write/README.md b/015_understanding-TCP-servers/06_dial-write/README.md
index 3d836a76..5e9cdb6f 100644
--- a/015_understanding-TCP-servers/06_dial-write/README.md
+++ b/015_understanding-TCP-servers/06_dial-write/README.md
@@ -1,3 +1,3 @@
run "02_read-scanner"
-run "07_dial-write"
\ No newline at end of file
+run "06_dial-write"
\ No newline at end of file
diff --git a/023_serving-files/02_serving/04_FileServer/01/main.go b/023_serving-files/02_serving/04_FileServer/01/main.go
index 5ff93afd..34a0df2a 100644
--- a/023_serving-files/02_serving/04_FileServer/01/main.go
+++ b/023_serving-files/02_serving/04_FileServer/01/main.go
@@ -7,11 +7,11 @@ import (
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
- http.HandleFunc("/dog", dog)
+ http.HandleFunc("/dog/", dog)
http.ListenAndServe(":8080", nil)
}
func dog(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
- io.WriteString(w, `
`)
+ io.WriteString(w, `
`)
}
diff --git a/026_appengine-deploy/01/app.yaml b/026_appengine-deploy/01/app.yaml
index 1dd8f1c6..fb82ec67 100644
--- a/026_appengine-deploy/01/app.yaml
+++ b/026_appengine-deploy/01/app.yaml
@@ -1,8 +1,6 @@
-application: temp-145415
-version: 1
-runtime: go
-api_version: go1
+runtime: go113
handlers:
- url: /.*
- script: _go_app
\ No newline at end of file
+ script: auto
+ secure: always
\ No newline at end of file
diff --git a/026_appengine-deploy/01/main.go b/026_appengine-deploy/01/main.go
index 68523458..671d6b1d 100644
--- a/026_appengine-deploy/01/main.go
+++ b/026_appengine-deploy/01/main.go
@@ -4,6 +4,7 @@ import (
"net/http"
)
-func init() {
+func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
+ http.ListenAndServe(":8080", nil)
}
diff --git a/026_appengine-deploy/02/app.yaml b/026_appengine-deploy/02/app.yaml
index 1dd8f1c6..fb82ec67 100644
--- a/026_appengine-deploy/02/app.yaml
+++ b/026_appengine-deploy/02/app.yaml
@@ -1,8 +1,6 @@
-application: temp-145415
-version: 1
-runtime: go
-api_version: go1
+runtime: go113
handlers:
- url: /.*
- script: _go_app
\ No newline at end of file
+ script: auto
+ secure: always
\ No newline at end of file
diff --git a/026_appengine-deploy/02/main.go b/026_appengine-deploy/02/main.go
index 68523458..671d6b1d 100644
--- a/026_appengine-deploy/02/main.go
+++ b/026_appengine-deploy/02/main.go
@@ -4,6 +4,7 @@ import (
"net/http"
)
-func init() {
+func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
+ http.ListenAndServe(":8080", nil)
}
diff --git a/026_appengine-deploy/README.md b/026_appengine-deploy/README.md
index 247ba1be..c256d787 100644
--- a/026_appengine-deploy/README.md
+++ b/026_appengine-deploy/README.md
@@ -1,30 +1,27 @@
-# buying a domain
+ # buying a domain
https://domains.google/#/
# deploying to [Google Cloud](https://cloud.google.com/)
- [install google appengine](https://cloud.google.com/appengine/docs/go/download)
-- [make sure python is installed VERSION 2.7.x](https://www.python.org/downloads/release/python-2712/)
- - python -V
- configure environment PATH variables
- google cloud developer console
- create a project
- get the project ID
-- update the app.yaml file with your project ID
+- set your go version in the app.yaml file
```
-application: temp-137512
-version: 1
-runtime: go
-api_version: go1
-
+runtime: go113
handlers:
- url: /.*
- script: _go_app
+ script: auto
+ secure: always
```
-- deploy to that project
+- deploy to that project. update --project with your project-id
```
-appcfg.py -A -V v1 update .
+gcloud app deploy app.yaml --project= -v 1
+my example:
+gcloud app deploy --project temp-137512
```
- view your project
- http://YOUR_PROJECT_ID.appspot.com/