Skip to content

Instantly share code, notes, and snippets.

View dipeshhkc's full-sized avatar
🏠
Working from home

Dipesh KC dipeshhkc

🏠
Working from home
View GitHub Profile
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", SimpleServer)
http.ListenAndServe(":8080", nil)
package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.New()
FROM golang:alpine
WORKDIR /golang-docker
ADD . .
RUN go mod download
RUN go get github.com/githubnemo/CompileDaemon
version: '3'
services:
web:
build:
context: .
dockerfile: ./docker/app.dockerfile
ports:
- 8080:8080
volumes:
FROM golang:alpine
WORKDIR /golang-docker
ADD . .
RUN go mod download
ENTRYPOINT go build && ./golang-docker
[mysqld]
character-set-server=utf8mb4
[client]
default-character-set=utf8mb4
FROM mysql:5.7.22
COPY ./docker/custom.cnf /etc/mysql/conf.d/custom.cnf
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
export default function Home() {
return (
<div>
<h2>Hurray!!! The Website is Complete. Lets Try Social Media Preview Now</h2>
</div>
)
}
import Head from "next/head";
export default function Home() {
return (
<div>
<Head>
<title>
Social Media Preview
</title>
<meta property="og:url" content="your url" />