https://github.com/gotomicro/embedctl
演示go命令行嵌入前端资源
https://github.com/gotomicro/embedctl
ant-design go116
Last synced: 5 months ago
JSON representation
演示go命令行嵌入前端资源
- Host: GitHub
- URL: https://github.com/gotomicro/embedctl
- Owner: gotomicro
- License: mit
- Created: 2021-02-06T13:56:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-09T01:51:40.000Z (over 4 years ago)
- Last Synced: 2024-06-20T06:32:32.599Z (11 months ago)
- Topics: ant-design, go116
- Language: TypeScript
- Homepage:
- Size: 927 KB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# embedctl
演示Go命令行嵌入前端资源## 需要Go版本 >= 1.16
## 安装
```go
go install github.com/gotomicro/embedctl@latest
```## 运行
```
➜ ~ embedctl
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)[GIN-debug] GET /ant/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
[GIN-debug] HEAD /ant/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
[GIN-debug] GET / --> main.main.func1 (3 handlers)
[GIN-debug] GET /welcome --> main.main.func2 (3 handlers)
[GIN-debug] GET /api/hello --> main.main.func3 (3 handlers)
[GIN-debug] GET /webui/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
[GIN-debug] HEAD /webui/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
```## 访问
浏览器输入localhost:8888