File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ func main() {
18
18
r := mux .NewRouter ()
19
19
r .HandleFunc ("/" , indexGetHandler ).Methods ("GET" )
20
20
r .HandleFunc ("/" , indexPostHandler ).Methods ("POST" )
21
+ fs := http .FileServer (http .Dir ("./static/" ))
22
+ r .PathPrefix ("/static/" ).Handler (http .StripPrefix ("/static/" , fs ))
21
23
http .Handle ("/" , r )
22
24
http .ListenAndServe (":8080" , nil )
23
25
}
Original file line number Diff line number Diff line change
1
+ body > div {
2
+ padding : 0.5em ;
3
+ width : 200px ;
4
+ margin : 1em 0em ;
5
+ background : # ccc ;
6
+ border : 1px solid # aaa ;
7
+ }
Original file line number Diff line number Diff line change 1
1
< html >
2
2
< head >
3
3
< title > Comments</ title >
4
+ < link rel ="stylesheet " type ="text/css " href ="/static/index.css ">
4
5
</ head >
5
6
< body >
6
7
< h1 > Comments</ h1 >
You can’t perform that action at this time.
0 commit comments