Closed fraserxu closed 9 years ago
Hi fraserxu, Sorry, cause i work overtime last Saturday, so not finish the task yet. My current work still have some problem mostly session control. Could i still have time to try to finish it this evening.And the deadline is?
@ChopperLee2011 No problem.
We usually don't have a clear deadline of our tasks. You can finish it when you have time. Don't worry about the time. :D
@fraserxu Hi, i think my code is ready for review, simple to achieve functional.
@ChopperLee2011 where did you push your code?
@quentinberder @fraserxu Sorry, forgot to add the address: github-oauth-repo
Good job @ChopperLee2011 I've seen you have made some good progress!
I just checked the code and find a few issues(mainly client side):
xmlhttprequest
and underscore
are not listed(but required for running) in the package.json(I guess it because of the issue you mention in the readme about the performance?);$locationProvider.html5Mode(true)
in your code, but not sure if you notice that the app will not work if user refresh the page, so we usually do not use this(using # instead).no data
in the page, which may leave the user the expression that there's no data, but the data is actually loading
, so I suggest you to change that.Backend
res.render
functon, maybe you can have a look. http://expressjs.com/4x/api.html#res.render
2.https://github.com/jaredhanson/passport/blob/298d2452430dd0d1841d417e9c0d0b23e4b06239/lib/http/request.js#L72 Passport is already clean the session you don't need destory session here https://github.com/ChopperLee2011/github-oauth-repo/blob/master/routes.js#L17 anymorejwt
to create a cookie token is a good idea, passport
and express session
can do it very well.@xeodou
you don't need destory session here
You don't need to but you can; destroying it can be a good thing if you have security concerns.
@ChopperLee2011
Good work so far. Focus on the frontend if you don't plan to dig into backend too much.
@fraserxu thanks for your advice, and my answer is:
i will read last replies careful this evening after work, thanks guys.
@xeodou thanks, i just feel tension that you review my codes so carefully~~ and here is my replies for your feedback
@fraserxu i create a new branch: meanjs, and upload the code, but it still upload node_module even i have the gitignore file, i do not know why?
Because the node_module
is already in your git trees. You need use git rm -rf node_modules
rm the folder from git trees.
@xeodou :+1:
@xeodou Thanks
Task
Build a simple application to do
oauth
with Github api, use the token to load repos and issues from Github and display it in the client.Mockup
Requirement
/login
express
/koa
in the backend to do oauth with Github and save a new user in the database(couchdb
/mongodb
/redis
);/repos
access_token
to get the list of repos from Github(this could be done from the back-end or you can use the token in the client to get the repo list), and then display them in the/repos
page;/repos/repo/:reponame
page, get the list of issues;/repo/:repoName
/repo/:repoName/:issueNumber
Goal
couchdb
+koa
+reactjs
+nodejs
Of course, you can still use the real MEAN stack.If you have any question, please don't hesitate to ask me here.