2 objects done!
I'm happy to announce that I now have two objects up and running on my API. There are still some kinks to work out – like error handling and such – but that's about it.
One thing I've noticed so far about working with Node.js is that you're in a different mind set then you are with other server-side platforms. Having your server only run on a single thread does force you to do things in different ways then you would in a multi-threaded environment. And because I have decided to go with PostgreSQL, I am finding that this change is amplified.
Working with SQL in PHP is somewhat trivial – there are a plethora of examples all over the internet and not to mention on the PHP.net site. However, with node.js I feel like google searches just bring me back to the same examples – namely the github project that I'm using.
Next I think I will start looking into the error handling. I want to make sure It's done properly so that the next objects that I create I can incorporate it from the start. I'm going to try to make it as simple but also as robust as possible. Not sure how this will turn out, but I'll let you know.