Registry / devops / node-ghost3a

node-ghost3a

JSON →
library3.2.2jsnpmunverified

A lightweight Node.js web server and WebSocket framework with built-in WebSocket client and cluster support. Version 3.2.2 is the latest stable release, with no clear release cadence. It provides a simple API for creating HTTP servers and WebSocket endpoints, and includes a Dart/Flutter client library via wssnet_ghost3a. Compared to alternatives like Socket.IO, it is more minimal and does not rely on external dependencies, but lacks features like automatic reconnection and fallback transports. Documentation is primarily in Chinese with source code comments.

npm install node-ghost3a
INSTALL
IMPORT
SIG · NODE-GHOST3A
N
node-ghost3a
devopsjavascriptv3.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GhostServer
import { GhostServer } from 'node-ghost3a'
const GhostServer = require('node-ghost3a').GhostServer
ESM import is recommended; CommonJS require also works but may need destructuring.
WebSocketServer
import { WebSocketServer } from 'node-ghost3a'
const WebSocketServer = require('node-ghost3a').WebSocketServer
Same as GhostServer, use destructured import for correct usage.
default
import ghost3a from 'node-ghost3a'
const ghost3a = require('node-ghost3a')
Default export provides top-level functions like createServer and createWebSocketServer.

Creates a simple HTTP server on port 3000 that responds with 'Hello World' on GET /hello.

import { GhostServer } from 'node-ghost3a'; const server = new GhostServer(); server.get('/hello', (req, res) => res.end('Hello World')); server.start(3000, () => console.log('Listening on 3000'));
Debug
Known issues
gotchaDocumentation is primarily in Chinese and source code comments may not be accessible to non-Chinese speakers.
fix
Refer to the source code or community translations for usage details.
affects: all
gotchaWebSocket client is for browser or Dart/Flutter; Node.js WebSocket client is not directly documented.
fix
For Node.js WebSocket client, use an established library like 'ws' instead.
affects: all
breakingVersion 3.x may have breaking changes from 2.x; API changes are not documented.
fix
Migrate by comparing API usage in source code examples or open issues on GitHub.
affects: >=3.0.0
deprecatedThe package is not actively developed; last update was in 2019.
fix
Consider using actively maintained alternatives like Express.js or Fastify.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'node-ghost3a'
Package not installed or not found in node_modules.
fix
Run 'npm install node-ghost3a' in your project directory.
TypeError: GhostServer is not a constructor
Using import/require incorrectly, e.g., importing default instead of named export.
fix
Use 'import { GhostServer } from 'node-ghost3a'' or 'const { GhostServer } = require('node-ghost3a')'.
ReferenceError: WebSocket is not defined
Using WebSocket client in Node.js without a WebSocket library.
fix
Install 'ws' library: 'npm install ws' and use 'const WebSocket = require('ws')'.
Upgrade
Version history
3.2.2latest on npm
Audit
Dependencies
pm2optionalRecommended for process management (cluster mode and production deployment).
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
node-ghost3a — npm install node-ghost3a · libregistry