Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncpa0/hardwire
https://github.com/ncpa0/hardwire
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ncpa0/hardwire
- Owner: ncpa0
- Created: 2023-10-31T15:13:54.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-20T14:05:05.000Z (5 months ago)
- Last Synced: 2024-08-26T11:24:09.214Z (5 months ago)
- Language: Go
- Size: 8.05 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
```sh
go get github.com/ncpa0/hardwire
```## Setup
```go
import (
"github.com/ncpa0/hardwire"
echo "github.com/labstack/echo/v4"
)func main() {
server := echo.New()hardwire.Configure(&hardwire.Configuration{
Entrypoint: "./src/index.tsx",
ViewsDir: "./pages",
StaticDir: "./static",
StaticURL: "/static",
})server.GET("/", func(c echo.Context) error {
return c.Redirect(303, "/home")
})server.Logger.Fatal(hardwire.Start(server, ":8080"))
}
```