I'm trying to get iris (http://iris-go.com) to serve both /api/ routes and host an angular SPA (in html5 mode).
package main
import (
"github.com/kataras/iris"
// "github.com/kataras/iris/utils"
// "strings"
)
func allVendorBrandLabel(c *iris.Context) {
c.WriteString("Hello, api :)")
}
func main() {
iris.Get("/api/all", allVendorBrandLabel)
iris.StaticWeb("/", "./www", 2)
iris.Listen(":8080")
}
Can't get this approach to work. Has anyone gotten iris to do this?
See the discussion answers on this topic:
https://github.com/iris-contrib/examples/issues/9