An open API service indexing awesome lists of open source software.

https://github.com/betterstack-community/worker-threads-demo


https://github.com/betterstack-community/worker-threads-demo

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Worker Threads Express App

This project demonstrates how to create a Node.js Express application using worker threads for non-blocking operations.

**Tutorial**: [A Beginner's Guide to Node.js Worker Threads](https://betterstack.com/community/guides/scaling-nodejs/nodejs-workers-explained/)

## 🟢 Prerequisites

Before running this application, ensure you have the following prerequisites:

- Node.js installed on your machine.
- Basic knowledge of JavaScript and Node.js.

## 📦 Getting started

To set up and run the project, follow these steps:

1. Clone the repository to your local machine:

```bash
git clone https://github.com/betterstack-community/worker-threads-demo.git
```

2. Navigate to the project directory:

```bash
cd worker-threads-express-app
```

3. Install dependencies:

```bash
npm install
```

4. Start the server:

```bash
npm start
```

5. Open your web browser and navigate to `http://localhost:3000/non-blocking` to see the non-blocking endpoint in action.

## âš– License

The code used in this project and in the linked tutorial are licensed under the [Apache License, Version 2.0](LICENSE).