File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 11# Changelog: HTTP Status
22
3+ ## Trunk
4+
5+ * readme: fix api example
6+
37## Version 1.4.0
48
59* codes: add status code classes
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ console.info(status[500]);
101101console .info (status[status .INTERNAL_SERVER_ERROR ]);
102102// Both output: "Internal Server Error"
103103
104- console .info (status[' 500_CODE ' ]);
105- console .info (status[` ${ status .INTERNAL_SERVER_ERROR } _CODE ` ]);
104+ console .info (status[' 500_NAME ' ]);
105+ console .info (status[` ${ status .INTERNAL_SERVER_ERROR } _NAME ` ]);
106106// Both output: "INTERNAL_SERVER_ERROR"
107107
108108console .info (status[' 500_MESSAGE' ]);
Original file line number Diff line number Diff line change 1- const status = require ( 'http-status ' ) ;
1+ const status = require ( '.. ' ) ;
22
33console . info ( status . INTERNAL_SERVER_ERROR ) ;
44// Output: 500
@@ -7,8 +7,8 @@ console.info(status[500]);
77console . info ( status [ status . INTERNAL_SERVER_ERROR ] ) ;
88// Both output: "Internal Server Error"
99
10- console . info ( status [ '500_CODE ' ] ) ;
11- console . info ( status [ `${ status . INTERNAL_SERVER_ERROR } _CODE ` ] ) ;
10+ console . info ( status [ '500_NAME ' ] ) ;
11+ console . info ( status [ `${ status . INTERNAL_SERVER_ERROR } _NAME ` ] ) ;
1212// Both output: "INTERNAL_SERVER_ERROR"
1313
1414console . info ( status [ '500_MESSAGE' ] ) ;
@@ -17,4 +17,4 @@ console.info(status[`${status.INTERNAL_SERVER_ERROR}_MESSAGE`]);
1717
1818console . info ( status [ '500_CLASS' ] ) ;
1919console . info ( status [ `${ status . INTERNAL_SERVER_ERROR } _CLASS` ] ) ;
20- // Both output: "5xx"
20+ // Both output: "5xx"
Original file line number Diff line number Diff line change 11const express = require ( 'express' ) ,
22 redis = require ( 'redis' ) ,
3- status = require ( 'http-status ' ) ;
3+ status = require ( '.. ' ) ;
44// New Express HTTP server
55const app = express . createServer ( ) ;
66// Regster a route
You can’t perform that action at this time.
0 commit comments