banner
biuaxia

biuaxia

"万物皆有裂痕,那是光进来的地方。"
github
bilibili
tg_channel

Build File Service Quickly with Go Language

title: Rapidly Building File Services with Go Language
date: 2021-10-15 16:25:00
toc: true
category:

  • Golang
  • GoFrame
    tags:
  • Golang
  • GoFrame
  • Language
  • Rapid
  • Building
  • File
  • Service

As shown in the figure:

Snipaste20211015162838.png

The code is as follows:

package main

import "github.com/gogf/gf/frame/g"

// Basic usage of static file server
func main() {
	s := g.Server()
	s.SetIndexFolder(true)
	s.SetServerRoot("C:\\Users\\biuaxia\\Desktop\\goProjects\\Tatisaurus")
	s.SetPort(8199)
	s.Run()
}

References#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.