File tree Expand file tree Collapse file tree 5 files changed +17
-15
lines changed
015_understanding-TCP-servers/06_dial-write
023_serving-files/02_serving/04_FileServer/01 Expand file tree Collapse file tree 5 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 11run "02_read-scanner"
22
3- run "07_dial -write"
3+ run "06_dial -write"
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ import (
77
88func main () {
99 http .Handle ("/" , http .FileServer (http .Dir ("." )))
10- http .HandleFunc ("/dog" , dog )
10+ http .HandleFunc ("/dog/ " , dog )
1111 http .ListenAndServe (":8080" , nil )
1212}
1313
1414func dog (w http.ResponseWriter , req * http.Request ) {
1515 w .Header ().Set ("Content-Type" , "text/html; charset=utf-8" )
16- io .WriteString (w , `<img src="http://github.com/toby.jpg">` )
16+ io .WriteString (w , `<img src="http://github.com/%3Cspan%20class="x x-first x-last">/ toby.jpg">`)
1717}
Original file line number Diff line number Diff line change 1- application : temp-145415
2- version : 1
3- runtime : go
4- api_version : go1
1+ runtime : go113
52
63handlers :
74- url : /.*
8- script : _go_app
5+ script : auto
6+ secure : always
Original file line number Diff line number Diff line change 1- application : temp-145415
2- version : 1
3- runtime : go
4- api_version : go1
1+ runtime : go113
52
63handlers :
74- url : /.*
8- script : _go_app
5+ script : auto
6+ secure : always
Original file line number Diff line number Diff line change 1- # buying a domain
1+ # buying a domain
22
33https://domains.google/#/
44
@@ -12,10 +12,16 @@ https://domains.google/#/
1212
1313```
1414runtime: go113
15+ handlers:
16+ - url: /.*
17+ script: auto
18+ secure: always
1519```
16- - deploy to that project
20+ - deploy to that project. update --project with your project-id
1721```
1822gcloud app deploy app.yaml --project=<YOUR_PROJECT_ID> -v 1
23+ my example:
24+ gcloud app deploy --project temp-137512
1925```
2026- view your project
2127 - http://YOUR_PROJECT_ID.appspot.com/
You can’t perform that action at this time.
0 commit comments