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() {
1818 r := mux .NewRouter ()
1919 r .HandleFunc ("/" , indexGetHandler ).Methods ("GET" )
2020 r .HandleFunc ("/" , indexPostHandler ).Methods ("POST" )
21+ fs := http .FileServer (http .Dir ("./static/" ))
22+ r .PathPrefix ("/static/" ).Handler (http .StripPrefix ("/static/" , fs ))
2123 http .Handle ("/" , r )
2224 http .ListenAndServe (":8080" , nil )
2325}
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 11< html >
22 < head >
33 < title > Comments</ title >
4+ < link rel ="stylesheet " type ="text/css " href ="/static/index.css ">
45 </ head >
56 < body >
67 < h1 > Comments</ h1 >
You can’t perform that action at this time.
0 commit comments