https://github.com/mandrigin/gin-spa
A simple SPA serving for gin-gonic
https://github.com/mandrigin/gin-spa
Last synced: about 1 year ago
JSON representation
A simple SPA serving for gin-gonic
- Host: GitHub
- URL: https://github.com/mandrigin/gin-spa
- Owner: mandrigin
- License: mit
- Created: 2020-02-11T15:51:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-12T13:32:09.000Z (over 6 years ago)
- Last Synced: 2025-03-23T11:04:44.479Z (about 1 year ago)
- Language: Go
- Size: 3.91 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gin-spa
A simple SPA (single-page application) serving for gin-gonic.
## Usage
```go
package main
import (
"github.com/gin-gonic/gin"
"github.com/mandrigin/gin-spa/spa"
)
func main() {
r := gin.Default()
r.Use(spa.Middleware("/", "./static/spa")) // your build of React or other SPA
r.Run()
}
```