mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-27 13:48:49 +08:00
26 lines
458 B
Go
26 lines
458 B
Go
![]() |
//
|
||
|
// Copyright (c) 2018
|
||
|
// Mainflux
|
||
|
//
|
||
|
// SPDX-License-Identifier: Apache-2.0
|
||
|
//
|
||
|
|
||
|
package api
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/go-zoo/bone"
|
||
|
"github.com/mainflux/mainflux"
|
||
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||
|
)
|
||
|
|
||
|
// MakeHandler returns a HTTP handler for API endpoints.
|
||
|
func MakeHandler() http.Handler {
|
||
|
r := bone.New()
|
||
|
r.GetFunc("/version", mainflux.Version("lora-adapter"))
|
||
|
r.Handle("/metrics", promhttp.Handler())
|
||
|
|
||
|
return r
|
||
|
}
|