Skip to content

Instantly share code, notes, and snippets.

View calidion's full-sized avatar
🕳️
Law & Order, All lives matter

Eric calidion

🕳️
Law & Order, All lives matter
View GitHub Profile
@calidion
calidion / gist:0e4acaa1f0bac02fbfa4ad0b339b277d
Last active February 6, 2021 06:27
A general purpose async session for node.js

A general purpose async session for node.js

this package is created for project aex,

but it is general to all node.js http processing.

It is on it's early stage, any contribution is appriciated.

It provide abstract class Store and Session.

@calidion
calidion / custom-error.js
Created July 10, 2016 10:18 — forked from justmoon/custom-error.js
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@calidion
calidion / login.test.js
Created May 1, 2016 01:25 — forked from joaoneto/login.test.js
Login session test with mocha
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
request(app)
.post('/v1/sessions')