This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", SimpleServer) | |
http.ListenAndServe(":8080", nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"github.com/gin-gonic/gin" | |
) | |
func main() { | |
r := gin.New() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine | |
WORKDIR /golang-docker | |
ADD . . | |
RUN go mod download | |
RUN go get github.com/githubnemo/CompileDaemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
web: | |
build: | |
context: . | |
dockerfile: ./docker/app.dockerfile | |
ports: | |
- 8080:8080 | |
volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine | |
WORKDIR /golang-docker | |
ADD . . | |
RUN go mod download | |
ENTRYPOINT go build && ./golang-docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
character-set-server=utf8mb4 | |
[client] | |
default-character-set=utf8mb4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mysql:5.7.22 | |
COPY ./docker/custom.cnf /etc/mysql/conf.d/custom.cnf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database: | |
build: | |
context: . | |
dockerfile: ./docker/db.dockerfile | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: root | |
MYSQL_PASSWORD: root | |
MYSQL_DATABASE: golang-docker | |
container_name: golang-docker-db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function Home() { | |
return ( | |
<div> | |
<h2>Hurray!!! The Website is Complete. Lets Try Social Media Preview Now</h2> | |
</div> | |
) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from "next/head"; | |
export default function Home() { | |
return ( | |
<div> | |
<Head> | |
<title> | |
Social Media Preview | |
</title> | |
<meta property="og:url" content="your url" /> |