测试文章

Test Jul 02, 2020
哈哈哈哈

测试哦

这是一篇测试文章

<article class="post-item">
	<h2 class="post-title"><a href="/welcome/">Welcome to Ghost</a></h2>
    <p>Welcome, it's great to have you here...</p>
    <a class="read-more" href="/welcome/">Read more</a>
</article>
package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"github.com/rs/xid"
	"sofuny/database"
	"sofuny/service"
)

func init() {
	//fmt.Println(database.NewDB())
	database.CreateTable()
	fmt.Println(xid.New().String())
}

func main() {
	app := gin.New()

	//
	app.Use(gin.Logger())
	app.Use(gin.Recovery())
	// static
	app.Static("/static", "./static")
	// templates
	app.LoadHTMLGlob("./templates/*.html")

	app.GET("/", func(ctx *gin.Context) {
		ctx.HTML(200, "index.html", gin.H{
			"title": "超有趣味",
			"name":  "首页",
		})
	})

	// api
	v1 := app.Group("/api/v1")

	v1.GET("/tags/", service.GetTags)

	_ = app.Run() // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
}
go语言

Sofuny

努力发光,然后照亮身边所有人。

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.