Socket
Socket
Sign inDemoInstall

zeanium-node

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zeanium-node - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

bin/zn

3

index.js

@@ -1,2 +0,1 @@

module.exports = require('./src/zn.core.minx.js');
//module.exports = require('zeanium');
module.exports = require('./src/zn.js');
{
"name": "zeanium-node",
"version": "0.5.5",
"version": "0.5.6",
"description": "Zeanium for Node.js, simple http server and custome your business.",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
"start": "node ./bin/zn.http.server run"
"start": "node ./bin/zn run"
},

@@ -19,2 +16,5 @@ "repository": {

"command",
"http",
"websocket",
"http-server",
"back-end",

@@ -34,12 +34,11 @@ "service",

"dependencies": {
"chokidar": "^1.6.1",
"formidable": "^1.0.17",
"ioredis": "^1.15.1",
"chokidar": "^1.7.0",
"formidable": "^1.1.1",
"mysql": "^2.13.0",
"zeanium": "^1.1.7"
"zeanium": "^1.1.8"
},
"preferGlobal": "true",
"bin": {
"zn": "./bin/zn.http.server"
"zn": "./bin/zn"
}
}
/**
* Created by yangyxu on 7/14/15.
*/
zn.define([
'node:ioredis'
],function (ioredis) {
zn.define(function () {
return zn.Class('Cache', {
properties: {
ip: '127.0.0.1',
port: 6379,
name: '_cache'
},
return zn.Class({
methods: {
init: function (objs){
this.sets(objs);
this._client = ioredis.createClient(this.port, this.ip);
this._client.on("connect", this.__onClientConnect.bind(this));
this._client.on("error", this.__onClientError);
},
close: function (){
this._client.quit(function (err, res) {
zn.info('Cache Client ' + this.name + ' Exited.');
});
},
set: function (key, value){
return this._client.set(key, value), this;
},
get: function (key, callback){
var _defer = zn.async.defer();
this._client.get(key, function (err, reply){
if(reply) {
_defer.resolve(reply);
} else {
_defer.reject(err);
}
});
return _defer.promise;
},
__onClientError: function (err){
zn.error('Cache Client Error: ' + err);
},
__onClientConnect: function (){
zn.info('Cache Client Connect: ' + this.name);
}

@@ -47,0 +11,0 @@ }

zn.define([
'./Cache',
'./CacheManager'
],function (Cache, CacheManager){
return {
Cache: Cache,
CacheManager: CacheManager
}
});
]);

@@ -10,3 +10,3 @@ /**

return zn.Class('Create', {
return zn.Class({
properties: {

@@ -13,0 +13,0 @@ env: null,

@@ -10,3 +10,3 @@ /**

return zn.Class('Develop', {
return zn.Class({
properties: {

@@ -13,0 +13,0 @@ env: null,

@@ -10,3 +10,3 @@ /**

return zn.Class('Create', {
return zn.Class({
properties: {

@@ -13,0 +13,0 @@ env: null,

@@ -10,3 +10,3 @@ /**

return zn.Class('Install', {
return zn.Class({
properties: {

@@ -13,0 +13,0 @@ env: null,

@@ -10,3 +10,3 @@ /**

return zn.Class('Run', {
return zn.Class({
properties: {

@@ -13,0 +13,0 @@ env: null,

zn.define(function () {
var Controller = zn.Class('Controller', {
var Controller = zn.Class({
methods: {

@@ -5,0 +5,0 @@ init: {

/**
* Created by yangyxu on 8/20/14.
*/
zn.define(['node:path'],function (node_path) {
zn.define([
'node:path'
],function (node_path) {

@@ -6,0 +8,0 @@ return zn.RequestHandler('ResourceRequestHandler', {

/**
* Created by yangyxu on 8/20/14.
*/
zn.define(['node:url'], function (node_url) {
zn.define([
'node:url'
], function (node_url) {

@@ -6,0 +8,0 @@ return zn.RequestHandler('RestfulRequestHandler', {

@@ -5,3 +5,3 @@ /**

zn.define([
'./config/server',
'./config/zn.server.config.js',
'./HttpServerContext',

@@ -8,0 +8,0 @@ 'node:http',

zn.define({
deploy: 'app',
models: '/src/model/',

@@ -3,0 +4,0 @@ controllers: '/src/controller/',

@@ -6,3 +6,3 @@ /**

'../../templete/html/exports.js',
'./config/mime',
'./config/zn.mime.config.js',
'node:fs',

@@ -9,0 +9,0 @@ 'node:path'

zn.define(function () {
return zn.Controller('api',{
properties: {
},
methods: {

@@ -8,0 +5,0 @@ list: function (request, response) {

@@ -6,3 +6,2 @@ zn.define(function () {

index: function (request, response) {
console.log('xxx');
response.success('default index');

@@ -9,0 +8,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc