February 24, 2018

NodeJS API Scaffolding

If you’re looking to launch an API using NodeJS, here is a very handy scaffolded application starting point: https://github.com/litwicki/nodejs-api What you get: Logging JWT Authentication MongoDB (via Mongoose) modeling md-seed migration and seed management for MongoDB Docker & Docker-Compose provisioning dotenv environment variable management APIDOC automatically generated documentation Check out the repository for a quick rundown and getting-started guide, and if you have any questions or issues please don’t hesitate to ask. Major thank you to danielfsousa and his boilerplate for the starting point of this scaffolding.

March 29, 2017

Software Development Testing

Too often best practices for testing are an after-thought, or a non-thought with respect to the development and deployment of code. This generally results in shortcuts or bandaids being applied to the SDLC of an organization which can build up over time and become a major constraint on the future product evolution. With respect to a PHP driven application, my preference is PHPUnit. So briefly a friendly reminder to distinguish your tests by categorization, without opening up a can-of-worms on how to classify a test; we can do that later. The simplest and easiest ways to get started with this is to organize your tests within PHPUnit, so you can run…

March 13, 2017

API environment contextual responses with Symfony3 Subscribers for Dev vs. Non-Dev

According to the ideal 12 Factor App you want to store your configuration in the specific environment. This includes debugging, logging, and everything else your application does. When building an API, these days you want your response data to be JSON, unless you’re an XML holdout which case you’re still using XML. Regardless, while in production you want clear and concise error message responses that do not reveal too much information. However, outside of production you probably want a quick way to see at least the source file throwing the exception so you know where to begin without crawling logs for every iterative issue while in development. For this you’ll need your…