Skip to content

current work into release candidate 1.0#1

Open
distrill wants to merge 52 commits intorc-1.0from
master
Open

current work into release candidate 1.0#1
distrill wants to merge 52 commits intorc-1.0from
master

Conversation

@distrill
Copy link
Owner

🍆

Copy link
Collaborator

@dv-blk dv-blk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, sorry I don't have anything constructive to say, yet, though I am inspired to learn and write some go

}

// GET /me
func (h *handler) getUser(c echo.Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(h * handler) is that like a decorator?

}{us[0], gs, ss})
}

// POST /me/goals
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting pattern, how you are defining routes in main and their functions separately, I like it.

sess, _ := session.Get("session", c)
sess.Options = &sessions.Options{
Path: "/",
MaxAge: 86400 * 7,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is refreshing their session?

// global middleware
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.Use(session.Middleware(sessions.NewCookieStore([]byte("big giant dick session secret"))))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the biggest.

e.Use(auth.CheckLogIn)

// static as
e.Static("/", "public")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dv-blk
Copy link
Collaborator

dv-blk commented May 13, 2018

Everything is so terse, it's pretty cool that you have a whole api here in less than a couple thousand lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants