Category: JavaScript

JavaScript Node.js

Node.js TypeScript #13. Sending data between Worker Threads

This entry is part 14 of 15 in the Node.js TypeScript

The Worker Threads give us quite exciting features when compared to, for example, child processes. In this article, we create our instances of the MessageChannel to communicate with the Worker Threads. Aside from that, we also share the data between them: it’s something that is not possible with child processes. Communicating using the MessageChannel There […]

JavaScript Node.js

Node.js TypeScript #9. The Event Loop in Node.js

This entry is part 9 of 15 in the Node.js TypeScript

JavaScript and the Node.js environment uses the Event Loop. In this article, we explore the idea of it and go through different phases that the event loop has. Although this series aims to present the usage of Node.js with TypeScript, this time we don’t get much of a chance to do it. In this part of […]

JavaScript Node.js

Node.js TypeScript #7. Creating a server and receiving requests

This entry is part 7 of 15 in the Node.js TypeScript

In this article, we continue the Node.js series. This time we listen for requests and send responses. To do that, we again use the HTPP module from Node.js. Node.js TypeScript: Creating a server, receiving requests In the TypeScript Express tutorial, we create a REST API that listens for requests and responds accordingly. While the Express framework is […]

JavaScript Node.js

Node.js TypeScript #5. Writable streams, pipes, and the process streams

This entry is part 5 of 15 in the Node.js TypeScript

In this article, we continue covering streams, since they have a significant role in Node.js development. This time we focus on writable streams and pipes. To illustrate how a writable stream works we implement our simple version of a stream writing to a file. We also provide examples of streams appearing in the Node.js environment in the global process object: stdin, […]