Find file
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (20 sloc) 727 Bytes


to get httpstatuscode from msdn(

httpStatusCode for node.js. Restfull api must be responsed a goog status. It can use with express.

npm install httpstatuscode


var httpStatusCode = require("httpstatuscode");

var toBeEqual = function (actual,expected){ if(actual !== expected){ throw (actual + " not equal " + expected); } };

toBeEqual(httpStatusCode.OK,200); toBeEqual(httpStatusCode.Created,201); toBeEqual(httpStatusCode.BadRequest,400); toBeEqual(httpStatusCode.InternalServerError,500);

console.log(httpStatusCode); console.log("success");