c# - MVC with angular Node.js and mongodb -
i building e-commerce application using mvc angular , node.js
the architecture diagram below
in mvc, using partial views contain sections "featured products", "favourite products" etc. these used in pages ever required using @html.partial("layoutname")
. header/footer etc in shared folder layouts
the authentication handled using oauth
, provide token user. request data sent node.js , validate token again for requests requires user details
fetching favourites etc
i doing configuring app.js in node.js
if (req.method == "post") { try { authenticationfunction(); //this authenticate token , call next() if success } catch (ex) { res.send("some message"); } }
for data binding use angular
are there better alternates should used in architecture?
i use mvc ability route requests, normal iframe , plain html faster cshtml pages? (i tried angular routing not able remove # url , working)
in node.js should use passport.js? faster/better current approach?
- is model secure? send token , userid request , validate them in node.js requests requiring authentication
Comments
Post a Comment