Simple and Second Web Servers in Node.js

I am about to call it a day. It is dark and cold (25 F) in the Twin Cities of Minneapolis and St. Paul. I am in my office attempting to finish this post while my wife is upstairs in the living room wrapped in a blanket. Tomorrow morning we will wake up to a balmy 12 F. What else can I say?

I am reading and experimenting with the content of the book “Get Programming with Node.js” by Jonathan Wexler. I am currently on page 55. Expect to be done with towards the end of next month. At that time I will switch to experiment with Deno. Then I will move on to generate and post a first pass of a storage server. It should be a lot of fun. Continue reading “Simple and Second Web Servers in Node.js”

REST API

It is another average fall day in the Twin Cities of Minneapolis and St. Paul. It is sunny and cold. Two more days for the weekend; not that it matters because we are still in the COVID-19 pandemic. That said things appear to be getting better. Hopefully a vaccine will be available soon and we will all get into a new normal.

I am still reading the book Hacker’s Delight by Henry Warren. I have a couple more chapters that I would like to finish before putting it down and starting Get Programming with Node.js by Jonathan Wexler. As I mentioned a few months ago, I will be working on a storage project for my blog. I will start with the APIs and database interface. I decided to use MongoDB for the metadata and the file system for the data. The server part code will be implemented using Node.js in JavaScript. After we have the base functionality we will split the software to work on multiple servers. Once that is done we will move to place the modules in Docker containers and will manage them with Kubernetes. Once all is well, I will see if we can move it to the Azure cloud. After that we will create and integrate additional features. Continue reading “REST API”

Basic RESTful Service – Part II

It is a rainy and stormy day in the Twin Cities of Minneapolis and St. Paul. All is well with rain, but I do shutdown my computers as soon as we get lightning. Have my computers connected via different power supplies, but on more than one occasion I have lost multiple components. So as soon as I hear thunder, I immediately shutdown and read until the storm subsides.

I worked in 2-hour blocks. At the end of the second block I went up and prepare tea. My wife and I have this morning ritual. What was unique today is that a rafter of wild turkeys was in our backyard. Last Friday the tom had two females and they were stopping traffic on the parkway. Today the rafter has grown to include seven females. There are several large parks and dozens of lakes and ponds in this area. We see turkeys year round. Continue reading “Basic RESTful Service – Part II”

Basic RESTful Service – Part I

One can use different programming languages, frameworks and libraries to develop a RESTful web server which exposes the same API. In this post I will implement a RESTful server using JavaScript, Express, and npm libraries.

Given that one needs to start with some level of requirements, we will use the following short and simple statement:

“Implement a very simple RESTful API for a storage server that supports store, query, retrieve and delete operations using DICOM data”. Continue reading “Basic RESTful Service – Part I”