mirror of
https://github.com/gabehf/BudgetBuddy.git
synced 2026-03-10 07:50:37 -07:00
api for initial widgets
This commit is contained in:
parent
36f751a69f
commit
4aa8a2f822
14 changed files with 864 additions and 11 deletions
15
main.go
15
main.go
|
|
@ -8,6 +8,15 @@ import (
|
|||
"github.com/go-chi/chi/v5"
|
||||
"github.com/jacobmveber-01839764/BudgetBuddy/db"
|
||||
"github.com/jacobmveber-01839764/BudgetBuddy/routes"
|
||||
"github.com/jacobmveber-01839764/BudgetBuddy/widgets"
|
||||
)
|
||||
|
||||
// TODO: expire transactions after one month on login
|
||||
// TODO: perform recurring transactions on login
|
||||
// TODO: give transactions ids so you can delete them
|
||||
|
||||
const (
|
||||
_PORT = ":3030"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -20,6 +29,10 @@ func main() {
|
|||
r.Post("/auth/login", routes.Login)
|
||||
r.Post("/auth/login/session", routes.Login)
|
||||
r.Post("/auth/createaccount", routes.CreateAccount)
|
||||
r.Get("/userinfo", routes.UserInfo)
|
||||
|
||||
log.Fatal(http.ListenAndServe(":3030", r))
|
||||
r.Mount("/w", widgets.Router())
|
||||
|
||||
log.Println("* Listening on " + _PORT)
|
||||
log.Fatal(http.ListenAndServe(_PORT, r))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue