npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

larasopp-server

v0.1.2

Published

Websocket server for laravel

Readme

Laravel WebSocket Server

WebSocket server for Laravel applications, providing real-time communication between clients and server.

Description

larasopp-server is a Node.js WebSocket server designed specifically for Laravel applications. It provides bidirectional communication between clients and server, supports channels, user authentication, and connection management.

Features

  • ✅ WebSocket connections with SSL/TLS support
  • ✅ User authentication via Laravel API
  • ✅ Support for public, private, and protected channels
  • ✅ Channel subscription management
  • ✅ Logging and debugging system
  • ✅ Server management via commands (control channel)
  • ✅ Presence channels with user data
  • ✅ Automatic connection and disconnection management

Requirements

  • Node.js 14.x or higher
  • Laravel application with installed larasopp/larasopp package
  • npm or yarn

Installation

Global Installation

npm i larasopp-server -g

Local Installation

npm i larasopp-server

Usage Without Installation

npx larasopp-server start

Running

After installation, start the server with:

larasopp-server start

or with npx:

npx larasopp-server start

Configuration

Create a larasopp-server.json file in the project root or in the directory from which the server is started.

Configuration Example

{
	"appHost": "http://127.0.0.1:8000",
	"key": "your-secret-key-here",
	"host": "0.0.0.0",
	"port": 3001,
	"debug": true,
	"log": true,
	"logPath": "./",
	"ssl": {
		"cert": "/path/to/certificate.crt",
		"key": "/path/to/private.key",
		"ca": "/path/to/ca.crt"
	}
}

Configuration Parameters

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | appHost | string | Yes | URL of your Laravel application (e.g., http://127.0.0.1:8000) | | key | string | Yes | Secret key for server management via control channel | | host | string | No | Host to listen on (default: 0.0.0.0) | | port | number | Yes | Port for WebSocket connections (default: 3001) | | debug | boolean | No | Enable debug mode (default: false) | | log | boolean | No | Enable file logging (default: false) | | logPath | string | No | Path to log directory (default: ./) | | ssl | object | No | SSL/TLS configuration for secure connections |

SSL/TLS Configuration

To enable SSL/TLS connections, add the ssl section to the configuration:

{
	"ssl": {
		"cert": "/path/to/certificate.crt",
		"key": "/path/to/private.key",
		"ca": "/path/to/ca.crt"
	}
}

Related Packages

JavaScript/TypeScript Client

npm install larasopp

Documentation: https://www.npmjs.com/package/larasopp

Laravel Package

composer require larasopp/larasopp

Development

Cloning the Repository

git clone <repository-url>
cd larasopp-nodejs

Installing Dependencies

npm install

Building the Project

npm run build

Running in Development Mode

npm start

Architecture

The server is built on the following components:

  • Server - main server class, manages WebSocket connections
  • Client - client class, handles authentication and messages
  • Channel - channel and subscription management
  • Core - base class with common functionality
  • Http - HTTP client for interacting with Laravel API
  • Config - configuration management

Security

  • Use a strong secret key (key) to protect the control channel
  • Enable SSL/TLS for production environments
  • Configure proper CORS policies in your Laravel application
  • Regularly update dependencies

License

MIT

Author

Sergey Serov

Support

If you encounter any issues or have questions, please create an issue in the project repository.