Shelter is combination of utility and application level scripts
Config:entry-interface.jsThis file the heart of any application in jswalker.every config variable is put here affect directly to application.
var JSWALKER=require("jswalker/system/js-walker.js");
JSWALKER.load({
startup:{scripts:["test-1","test-2"], },
host: {
application_name:{
host:["localhost","jswalker.in"],
path:"application_name",
auth:"authentication",
default_routing:{
initial_page:{flag:true,from:"/",to:"demo"}
},
base:{
app_path:process.cwd(),
uglify:{flag:false},
minify:{flag:false}
},
glance:{
flag:true,
http:[
{
"*": { entry:true , exit:true , scripts:["glance1.js","glance2.js"] }
},
{
"/test": { entry:true , exit:true , scripts:["glance1.js","glance2.js"] }
}
],
ajax:[],
socket:[]
}
}
}
cluster:{flag:false},
error_push:{
file:{flag:true},
mysql:{flag:true}
},
console_trace:{flag:true},
redis:{flag:false,port:6379},
favicon:{path:process.cwd()+"/shelter/utility/favicon/favicon.ico"},
template:{cache:false},
default_routing:{user_friendly_error:false},
http:{
base:{port:80,},
socket:{flag:true,port:8081},
},
https:{
flag:false,
base:{port:443 },
certificate_path:"ssl_certificate",key:"localhost.com",certificate:"localhost.com",
socket_server_bind_port:8081,
socket:{flag:true, port:8081 }
},
system_micro_service:{
memory_trace:{
flag:true,
file:true,
mysql:true
},
error_trace:{
flag:true,
file:true,
mysql:true
},
database_trace:{
flag:true,
file:true,
mysql:true
}
},
database:{
mongo_pool:{
flag:true,
dbs:[
{name:"test1",host:"127.0.0.1",port:27017,user:"root",password:"password"},
{name:"test2",host:"127.0.0.1",port:27017,user:"root",password:"password"}
]
},
mysql_pool:{
flag:true,
dbs:[
{prefix:"jswalker,name:"jswalker",host:"127.0.0.1",user:"root",password:"password",mysql_path:false},
{prefix:"test",name:"test",host:"127.0.0.1",user:"root",password:"password",mysql_path:false},
]
}
}
});
Startup
Startup scripts are useful to initiate while on project startup,it is also helpful in cluster no duplicate startup scripts called in cluster mode.
All startup scripts are found in : shelter/startup/task
Host is responsibe all application and its related config variables
application_name :
top level directory name inside host directory
Note : all variables are self-explanatory.
ClusterIf cluster flag true Now jswalker use all of cpu core.
Console traceOne of the finest approach in jswalker to trace error inside 'BROWSER CONSOLE' to trace success as well as faulty code.
RedisBest for session if Redis installed on machine to use persist session.
FaviconPath
TemplateThis is cache mechanism of template set true when remtoe server used.
Default routingIt is Show either system error or user friendly error
HttpBy default app is running no http server with port setting
HttpsHttps just add path for key and certificate and also socket bind port for socket transmission
System micro serviceMemory trace and error trace in jswalker either in file or mysql ( Mysql is recommended for dashboard )
Nervous system of jswalker or Every enterprise.
What enterprise valuable resource is database and not one there are many databases used in single application
and jswalker core is designed exactly according to that.
Currently jswalker is by default supplied with two major database : MySql(Multi flavour) And MongoDb(Multi flavour)
and many more database supported (if node.js driver for database available) then it is perfectly used in jswalker.
to handle at native level.