You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
313 B
19 lines
313 B
package main
|
|
|
|
import (
|
|
"log"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func main() {
|
|
app := fiber.New()
|
|
|
|
// handler that returns one json from a sql database
|
|
app.Get("/api/stream/", func (c *fiber.Ctx) error {
|
|
return c.SendString("[]")
|
|
})
|
|
|
|
app.Static("/", "./public")
|
|
|
|
log.Fatal(app.Listen(":5001"))
|
|
}
|
|
|