Skip to content

Playground with NATS WS & Node for location + message sharing.

Notifications You must be signed in to change notification settings

sachin-duhan/nats-pulse

Repository files navigation

Location stream - NATS WS

A Node.js backend for a location-sharing application using Express, MongoDB, NATS messaging, and JWT authentication. This application provides endpoints for user authentication, ride orders, and location updates.

Features

  • JWT Authentication: Secure endpoints using JSON Web Tokens.
  • NATS Messaging: Real-time communication for ride orders and location updates.
  • MongoDB: Store and track rider location details.
  • Dockerized Setup: Easily deployable with Docker and Docker Compose.

Prerequisites

  • Node.js and npm
  • Docker and Docker Compose for containerized deployment

Setup

1. Environment Configuration

Create a .env file with the following:

cp .env.example .env

2. Install Dependencies

make install

3. Run Locally (Development Mode)

make dev

4. Docker Deployment

Build and start the containers:

make docker-build
make docker-up

To stop and remove containers:

make docker-down

5. View Logs

make logs

Running Tests

To run tests with Jest and Supertest:

make test

About

Playground with NATS WS & Node for location + message sharing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published