Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LvChengbin committed Sep 24, 2018
1 parent cf19a47 commit 4b2aaf0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const createServer = ( config, basePath, files, logger ) => {
this.router.any( '*', /.*/, async ( ctx, next ) => {
try {
await next();
} catch( e ) {
ctx.status = e.status;
} finally {
cors( ctx, config );
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karma-server",
"version": "0.0.3",
"version": "0.0.4",
"description": "Start a server based on Ynn.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion server-declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
( function() {
// This file is generated by karma-server.
window.ynn = window.ynn || {};
window.ynn.time = 1537769349298;
window.ynn.time = 1537770203986;
window.ynn.port = 3000;
window.ynn.host = 'http://127.0.0.1:3000';
} )();
Expand Down

0 comments on commit 4b2aaf0

Please sign in to comment.