Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
A real-time database package for communicating with Pyxiscloud server using WebSockets
PyxisDB is a real-time database package for communicating with PyxiCloud server. It provides a secure and efficient way to interact with your database using WebSocket connections.
https://docs.pyxisdb.letz.dev/
First, you need to install and set up PyxiCloud.
npm install pyxisdb@latest
const pyx = require('pyxisdb').default;
import pyx from "pyxisdb";
// Connect with authentication
pyx.connect('pyx://<hostname/ip>:<port>', {
username: 'your_username',
password: 'your_password'
})
.then(() => {
console.log('Connected and authenticated');
// Define a schema
const userSchema = new pyx.Schema({
name: { type: 'string', required: true },
email: { type: 'string', required: true, unique: true }
}, 'users');
// Create and use model
const User = pyx.model('users', userSchema);
// Insert data
User.insertOne({
name: 'John Doe',
email: 'john@example.com'
})
.then(result => console.log('User created:', result));
})
.catch(error => console.error('Connection error:', error));
pyx.connect(url: string, auth: {
username: string;
password: string;
}): Promise<void>
new pyx.Schema({
field: {
type: string;
required?: boolean;
unique?: boolean;
default?: any;
}
}, collectionName: string)
// Find documents
Model.find(query?: Record<string, any>)
Model.findOne(query?: Record<string, any>)
// Insert documents
Model.insertOne(document: Record<string, any>)
Model.insertMany(documents: Record<string, any>[])
// Update documents
Model.updateOne(query: Record<string, any>, update: Record<string, any>)
Model.updateMany(query: Record<string, any>, update: Record<string, any>)
// Delete documents
Model.deleteOne(query: Record<string, any>)
Model.deleteMany(query: Record<string, any>)
// Comparison
{ field: { $eq: value } } // equals
{ field: { $ne: value } } // not equals
{ field: { $gt: value } } // greater than
{ field: { $gte: value } } // greater than or equal
{ field: { $lt: value } } // less than
{ field: { $lte: value } } // less than or equal
{ field: { $in: [values] } } // in array
{ field: { $nin: [values] }} // not in array
This project is licensed under the MIT License.
FAQs
A real-time database package for communicating with Pyxiscloud server using WebSockets
We found that pyxisdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.