https://github.com/exortek/nodejs-streams-examples
https://github.com/exortek/nodejs-streams-examples
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/exortek/nodejs-streams-examples
- Owner: ExorTek
- Created: 2025-06-29T11:11:03.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-07-18T00:57:53.000Z (11 months ago)
- Last Synced: 2025-07-30T23:23:54.419Z (11 months ago)
- Language: JavaScript
- Homepage: https://medium.memet.dev/node-js-streams-veri-ak%C4%B1%C5%9F%C4%B1nda-uzmanla%C5%9F%C4%B1n-37f26cd574c3
- Size: 177 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Stream Examples
This project uses Yarn Workspaces to manage a monorepo containing both frontend and backend applications.
## Project Structure
```
nodejs-streams-examples/
├── backend/ # Backend workspace
├── frontend/ # Frontend workspace
└── package.json # Root package.json
```
## Prerequisites
- [Node.js](https://nodejs.org/) (recommended latest LTS version)
- [Yarn](https://yarnpkg.com/)
## Getting Started
### 1. Clone the repository
```bash
git clone https://github.com/ExorTek/nodejs-streams-examples.git
cd nodejs-streams-examples
```
### 2. Install dependencies
From the root directory, run:
```bash
yarn
# or
yarn install
```
This command will install all dependencies for the root project and all workspaces (backend and frontend).
### 3. Development
To start both backend and frontend development servers simultaneously:
```bash
yarn dev
```
## Workspace Commands
### Root Workspace
| Command | Description |
|---------------|-----------------------------------------------------|
| `yarn dev` | Start both backend and frontend in development mode |
| `yarn format` | Format code using Prettier |
### Backend Workspace
From the root directory:
```bash
yarn workspace backend [command]
```
Replace `[command]` with any script defined in the backend's package.json.
### Frontend Workspace
From the root directory:
```bash
yarn workspace frontend [command]
```
Replace `[command]` with any script defined in the frontend's package.json.
## Adding Dependencies
### Adding a dependency to a specific workspace
```bash
# Add a dependency to the backend
yarn workspace backend add [package-name]
# Add a development dependency to the backend
yarn workspace backend add [package-name] --dev
# Add a dependency to the frontend
yarn workspace frontend add [package-name]
```
### Adding a dependency to the root project
```bash
yarn add [package-name]
```
## Upgrading Dependencies
To upgrade a dependency in a specific workspace:
```bash
yarn workspace [workspace-name] up [package-name]
```
To upgrade all dependencies:
```bash
yarn up
```