Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fussel178/nats-ts-test
Proof of concept that tests nats.js in TypeScript and Node v16
https://github.com/fussel178/nats-ts-test
Last synced: about 1 month ago
JSON representation
Proof of concept that tests nats.js in TypeScript and Node v16
- Host: GitHub
- URL: https://github.com/fussel178/nats-ts-test
- Owner: fussel178
- License: mit
- Created: 2023-01-09T02:57:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T03:09:25.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T08:12:50.114Z (2 months ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PoC: nats.js in TypeScript
This is a simple proof of concept that tests nats.js in TypeScript and Node v16.
## Installation
You'll the following tools:
- [Node.js v16](https://nodejs.org/)
- [pnpm](https://pnpm.io/)
- [nats-server](https://docs.nats.io/nats-concepts/what-is-nats/walkthrough_setup#installing-the-nats-server-locally-if-needed)1. Clone this repository:
```shell
git clone [email protected]:fussel178/nats-ts-test.git
cd nats-ts-test
```2. Install development dependencies:
```shell
pnpm install
```3. Start the nats-server:
```shell
pnpm start:server
```4. Start the client:
```shell
pnpm start:client
```5. Login into the server:
```shell
nats context create devel
nats content edit devel
```6. Publish some data:
```shell
nats publish my.subscription "Hello World. Time: {{ UnixNano }}" --count=100 --sleep=0.5s
```