I'm after some direction about how to adapt a web app to work with express/mongodb/node.js Disclaimer: newbie to node, back-end server devlopment etc.
I have a web app which consists of a single html page, some css and a fair amount of javascript. Obviously, at this stage, everything runs client-side from the browser which is fine... but now I'm at the stage where I need to establish some server side features such as user account control, file upload and storage etc. As I am familiar with javascript, Node is an obvious choice for me.
From my research so far, it seems fairly straight forward to setup a simple express based server and I've found several hello-world tutorials to do just this, but most of these tutorials seem to be about starting a new app from scratch, and I'm left wondering what to do with all my existing javascript code... so my question is this.. Should I
- leave the client side code as is and setup a simple server side node implementation that just talks to the database
- Setup a server side node implementation, move all my javascript to the server and use some kind of templating to serve up content to the browser.
- I'm completely missing the point here, and there's a way better way to do this
Pros and cons would be great Thanks in advance, and go easy on a newbie!!
Aucun commentaire:
Enregistrer un commentaire