Skip to content

Commit c10ec70

Browse files
committed
feat(microstream-client): The primary working setup for microstream-client.
This is the first commit - with the primary version (v1) of a working version of microstream-client.
0 parents  commit c10ec70

File tree

11 files changed

+5644
-0
lines changed

11 files changed

+5644
-0
lines changed

.gitignore

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Node.js
2+
node_modules/
3+
npm-debug.log
4+
yarn-error.log
5+
6+
# TypeScript
7+
dist/
8+
*.tsbuildinfo
9+
10+
# Environment variables
11+
.env
12+
.env.local
13+
.env.development
14+
.env.test
15+
.env.production
16+
17+
# IDE/Editor
18+
.vscode/
19+
.idea/
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
# OS generated files
27+
.DS_Store
28+
.DS_Store?
29+
._*
30+
.Spotlight-V100
31+
.Trashes
32+
ehthumbs.db
33+
Thumbs.db
34+
35+
# Logs and databases
36+
*.log
37+
*.sql
38+
*.sqlite
39+
40+
# Dependency directories
41+
jspm_packages/
42+
43+
# Optional npm cache directory
44+
.npm
45+
46+
# Optional eslint cache
47+
.eslintcache
48+
49+
# Optional REPL history
50+
.node_repl_history
51+
52+
# Output of 'npm pack'
53+
*.tgz
54+
55+
# Yarn Integrity file
56+
.yarn-integrity
57+
58+
# dotenv environment variables file
59+
.env
60+
61+
# Build files
62+
build/
63+
out/

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
src/
3+
tsconfig.json

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
Copyright © 2025 Arijit Banerjee
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Microstream Client SDK
3+
4+
A lightweight client SDK for Microstream communication.
5+
6+
## Installation
7+
8+
```bash
9+
npm install microstream-client
10+
```
11+
12+
## Usage
13+
14+
```typescript
15+
import { MicrostreamClient } from "microstream-client";
16+
17+
const client = new MicrostreamClient({
18+
hubUrl: "http://localhost:3000",
19+
serviceName: "auth-service",
20+
});
21+
22+
client.onRequest("authenticate", (data) => {
23+
console.log("Received authentication request:", data);
24+
return { success: true, token: "sample-token" };
25+
});
26+
27+
const response = await client.sendRequest("jwt-service", "generate_jwt", { userId: 123 });
28+
console.log("Received response:", response);
29+
```

bun.lockb

111 KB
Binary file not shown.

0 commit comments

Comments
 (0)