first commit
This commit is contained in:
commit
5cb003f241
|
@ -0,0 +1,6 @@
|
|||
FROM golang:1.13
|
||||
RUN go get -u github.com/johndoe/mywebserver/template/...
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN go install .
|
||||
CMD ["/app/myweb"]
|
Binary file not shown.
After Width: | Height: | Size: 216 KiB |
|
@ -0,0 +1,2 @@
|
|||
console.log('Hello from script.js!');
|
||||
alert('JavaScript is working!');
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
docker build -t mywebserver:1.0 .
|
||||
|
||||
docker run -d -p 8000:8000 mywebserver:1.0
|
|
@ -0,0 +1,12 @@
|
|||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", hello)
|
||||
http.ListenAndServe(":8000", nil)
|
||||
}
|
||||
|
||||
func hello(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("Hello World!"))
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<img src="/static/img/logo.png">
|
||||
<script src="/static/js/script.js"></script>
|
Loading…
Reference in New Issue