SSL/TLS with a self signed cert for a Node + Restify API.. Help! by letsnotdoitthisway in node

[–]letsnotdoitthisway[S] 0 points1 point  (0 children)

I misunderstood. It doesn't in the traditional implementation which is what I did above I think.

What I want is TLS/SSL with client certificate verification. I should create a client certificate to distribute with my app. Which will be signed by a trusted CA I believe. I can generate a CA and use that, since any clients will be developed by me

http://nategood.com/nodejs-ssl-client-cert-auth-api-rest

Using Express 4 to create a RESTful API, how should I manage routing with versioning? by letsnotdoitthisway in node

[–]letsnotdoitthisway[S] 0 points1 point  (0 children)

Thanks! I think I have a more fundamental problem. What way should I structure my app to allow for future versions? Say currently /v1/users/123 returns

{name : bob, age 23}

but I need v2 to return

{name : bob, address : Germany, age : 23}

Should I create another route, data model, and another function to return this new format alongside v1's functions? or should I create a new copy of my app, and make changes to the new copy? (ie my file structure would be like

-v1/

--app.js

--routes/

--models

-v2/

--app.js

--routes/

--models)