Jobs & Workflows
https://armen.surge.sh
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.
35 lines
1000 B
35 lines
1000 B
/* |
|
------------------------------------------------------------------------------------------------------------------------ |
|
####### gui ####### Copyright (c) 2021 mls-361 ##################################################### MIT License ####### |
|
------------------------------------------------------------------------------------------------------------------------ |
|
*/ |
|
|
|
package gui |
|
|
|
import ( |
|
"net/http" |
|
|
|
"forge.chapril.org/armen/armen/internal/components" |
|
) |
|
|
|
func Build(ccs *components.Components) { |
|
router := ccs.Router |
|
|
|
router.ServeFiles("/static/*filepath", http.Dir("static")) |
|
|
|
router.Get("/", http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { |
|
_ = newDashboard(ccs). |
|
build(). |
|
Render(w) |
|
})) |
|
|
|
router.Get("/dashboard", http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { |
|
_ = newDashboard(ccs). |
|
build(). |
|
Render(w) |
|
})) |
|
} |
|
|
|
/* |
|
######################################################################################################## @(°_°)@ ####### |
|
*/
|
|
|