Express API Refkit

Posted on Leave a comment

https://github.com/anuragbhd/express-api-refkit

I frequently create APIs for muse/professional apps, and every time I find myself scrambling to pick the best pieces from my previously built APIs or online repositories.

To streamline this, I recently created this reference kit (mostly for myself) to help me in writing a production-grade Express-based API from scratch. Sharing with this group in hopes that my fellow XTians will benefit from it when writing their own RESTful APIs.

As noted in the docs:

This is NOT a starter template. The purpose of this repository is to provide reference code to anyone looking to create a beautiful, secure and well-tested Node/Express-based API from scratch.

Creating from scratch has the invaluable benefit of learning while doing. Most likely, there will be struggle which will make you better. You will know by heart all parts under the hood and exactly how they interact with each other. Basing your project off of a starter kit takes that away from you. Hence the need for a reference kit (or refkit, as I like to call it).

If you are experienced in Express, feel free to open pull requests to add improvements.

Contributions in any form are welcome 💁‍♂️

Featured image credit Nick Youngson CC BY-SA 3.0 Alpha Stock Images

Declarative Programming

Posted on Leave a comment

One of my latest obsessions is GraphQL. While reading a tutorial, I found out that GraphQL follows declarative programming paradigm. The video tutorial gave examples to differentiate imperative paradigm that REST technologies use from declarative paradigm that GraphQL uses to make our lives easy. It was not the first time I’d come across these two terms, just that in all previous instances I didn’t care enough to investigate them in detail. When I, however, did dig deeper I was pleasantly surprised.

This stackoverflow thread does a good job in explaining the contrast. So, what some people see as convenience features of C# (when comparing with Java) is actually its declarative style of programming. As a developer obsessed with convention over configuration, it was not hard to fall for this style.