Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
REQUIREMENTS for NPush Module
MongoDB
Default mongo installation and you need to create dedicated schema:
1.1 Accounts collection
Name of collection: accounts
Single document schema per client/user:
{
"apps" : [
{ "apis" : [
{ "name" : "api 1",
"id" : ObjectId( "50ae010ab19160bb1d010000" )
},
{ "name" : "api 2",
"id" : ObjectId( "50ae010ab19160bb1d010001" )
}
],
"application_id" : "1",
"dscr" : "first application",
"id" : ObjectId( "50ae0106b19160bb1d000000" ),
"name" : "application 1"
},
{ "apis" : [
{ "name" : "api 1",
"id" : ObjectId( "50ae010ab19160bb1d010002" )
},
{ "name" : "api 2",
"id" : ObjectId( "50ae010ab19160bb1d010003" )
}
],
"application_id" : "2",
"dscr" : "second application",
"id" : ObjectId( "50ae0106b19160bb1d000001" ),
"name" : "application 2"
}
],
"client_room" : "localhost",
"dscr" : "localhost",
"name" : "localhost",
"password" : "localhost",
"username" : "localhost"
}
1.2 APIs collection
Name of collection: apis
Single document schema per api:
{
"enabled" : "true",
"key" : "50ae010ab19160bb1d010000",
"client" : "50adfdfeb19160a41d000000",
"time" : 1355310922
}
1.3 Also you have to pass mongodb setting to the worker instance:
{ 'MongoDB' : { 'url' : "user:pass@localhost:27017/ni_sockets", 'collections' : ["accounts", "apis"] }, }
To manage clients, application and apis it is highly recommended to use "npush-admin" project.
RedisServer
Default installation. If you want to use own PORT and HOST address then pass this settings to worker instance:
{ 'RedisServer' : { 'redisClient' : { 'port' : 6379, 'host' : 'localhost'} }, }
Example
To run example you need mongoDB with right schema and Redis working.
Steps:
Have fun!
FAQs
n:push Real Time Messaging System by Newicon Ltd.
The npm package npush receives a total of 1 weekly downloads. As such, npush popularity was classified as not popular.
We found that npush demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.