Rename talk files to _go
parent
295388cd87
commit
1269902a63
|
@ -25,7 +25,7 @@ chris@influxdb.com
|
||||||
|
|
||||||
* Simplest File Server
|
* Simplest File Server
|
||||||
|
|
||||||
.code simple/router.go
|
.code simple/router_go
|
||||||
|
|
||||||
- However, React routing needs "wildcard" route to return same HTML page.
|
- However, React routing needs "wildcard" route to return same HTML page.
|
||||||
- Client-Side Routing!
|
- Client-Side Routing!
|
||||||
|
@ -36,15 +36,15 @@ chris@influxdb.com
|
||||||
|
|
||||||
* Wildcard routing to default asset
|
* Wildcard routing to default asset
|
||||||
|
|
||||||
.code net/http/fs.go /func FileServer/,/^}/
|
.code net/http/fs_go /func FileServer/,/^}/
|
||||||
|
|
||||||
Implement `FileSystem` with a default file
|
Implement `FileSystem` with a default file
|
||||||
|
|
||||||
.code simple/dir.go /type/,/OMIT END/
|
.code simple/dir_go /type/,/OMIT END/
|
||||||
|
|
||||||
* Minimal React Host Server
|
* Minimal React Host Server
|
||||||
|
|
||||||
.code simple/react.go
|
.code simple/react_go
|
||||||
|
|
||||||
* Problems with SPA
|
* Problems with SPA
|
||||||
- Slow loads
|
- Slow loads
|
||||||
|
@ -54,31 +54,31 @@ Implement `FileSystem` with a default file
|
||||||
- Cache-Control: [[https://tools.ietf.org/html/rfc7234#section-5.2]]
|
- Cache-Control: [[https://tools.ietf.org/html/rfc7234#section-5.2]]
|
||||||
- ETag: [[https://tools.ietf.org/html/rfc7232#section-2.3]]
|
- ETag: [[https://tools.ietf.org/html/rfc7232#section-2.3]]
|
||||||
|
|
||||||
.code caching/dist.go /w\./,/^}/
|
.code caching/dist_go /w\./,/^}/
|
||||||
|
|
||||||
- Strong ETag validation
|
- Strong ETag validation
|
||||||
|
|
||||||
* Compression
|
* Compression
|
||||||
- gzip middleware by `github.com/NYTimes/gziphandler`
|
- gzip middleware by `github.com/NYTimes/gziphandler`
|
||||||
.code gzip/mux.go
|
.code gzip/mux_go
|
||||||
|
|
||||||
* Authentication and Authorization
|
* Authentication and Authorization
|
||||||
- If authenticated able to see assets else redirected to /login
|
- If authenticated able to see assets else redirected to /login
|
||||||
- If authorized able to read parts of REST API
|
- If authorized able to read parts of REST API
|
||||||
|
|
||||||
.code auth/auth.go /func AuthorizedToken/,/^}/
|
.code auth/auth_go /func AuthorizedToken/,/^}/
|
||||||
|
|
||||||
* Bonus middleware :)
|
* Bonus middleware :)
|
||||||
|
|
||||||
* HSTS
|
* HSTS
|
||||||
.code hsts/hsts.go /HSTS/,/^}/
|
.code hsts/hsts_go /HSTS/,/^}/
|
||||||
|
|
||||||
- informs the client to cache that HTTPS should be used for a length of time.
|
- informs the client to cache that HTTPS should be used for a length of time.
|
||||||
- if client receives HTTP instead reject as a possible man-in-the-middle.
|
- if client receives HTTP instead reject as a possible man-in-the-middle.
|
||||||
- HSTS doesn't redirect HTTP to HTTPS but rather is only used on HTTPS responses.
|
- HSTS doesn't redirect HTTP to HTTPS but rather is only used on HTTPS responses.
|
||||||
|
|
||||||
* Version
|
* Version
|
||||||
.code version/version.go /func Version/,/^}/
|
.code version/version_go /func Version/,/^}/
|
||||||
- Not necessarily directly useful for React
|
- Not necessarily directly useful for React
|
||||||
- Nice for debugging
|
- Nice for debugging
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ Implement `FileSystem` with a default file
|
||||||
- index.html generally comes from /
|
- index.html generally comes from /
|
||||||
- Operationally, nice to serve from different routes
|
- Operationally, nice to serve from different routes
|
||||||
- Better way? Help!
|
- Better way? Help!
|
||||||
.code prefixer/url_prefixer.go /\*URLPrefixer/,/^}/
|
.code prefixer/url_prefixer_go /\*URLPrefixer/,/^}/
|
||||||
|
|
||||||
* Development Environment
|
* Development Environment
|
||||||
- One repository
|
- One repository
|
||||||
|
|
Loading…
Reference in New Issue