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:
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()
}