Skip to content

Instantly share code, notes, and snippets.

View bensontung's full-sized avatar

Benson Tung bensontung

View GitHub Profile
@bensontung
bensontung / getNum.js
Created October 27, 2015 13:16 — forked from shepherdwind/getNum.js
fast way to find path
/* 后端数据 */
var data = {
"10;20;30": {
price: 5,
count: 1
},
"10;20;31": {
price: 10,
count: 2
},
@bensontung
bensontung / test.js
Last active August 29, 2015 14:26 — forked from mscdex/test.js
sharing sessions between node.js and php using redis
var express = require('express'),
app = express(),
cookieParser = require('cookie-parser'),
session = require('express-session'),
RedisStore = require('connect-redis')(session);
app.use(express.static(__dirname + '/public'));
app.use(function(req, res, next) {
if (~req.url.indexOf('favicon'))
return res.send(404);