-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
general user model and constants defined #29
Conversation
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Models won't be kept in the auth module.For now they shall be kept in the global module space so that every package can use it.
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"net/http" | ||
"time" | ||
|
||
"github.com/gorilla/mux" | ||
"github.com/p-society/gCSB/auth/pkg/constants" | ||
) | ||
|
||
func main() { | ||
|
||
r := mux.NewRouter() | ||
srv := &http.Server{ | ||
Handler: r, | ||
Addr: "127.0.0.1:8000", | ||
WriteTimeout: 15 * time.Second, | ||
ReadTimeout: 15 * time.Second, | ||
} | ||
r.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) { | ||
w.Write([]byte("pong")) | ||
}).Methods("GET") | ||
http.Handle("/", r) | ||
log.Fatal(srv.ListenAndServe()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Auth Module won't be a different service. It will just have 2 functions as of now that verifies and creates tokens as discussed
No description provided.