Add error handling to the frontend
This commit is contained in:
parent
b5cb3e78ab
commit
0a9ea15b58
6 changed files with 77 additions and 18 deletions
3
app.js
3
app.js
|
@ -15,6 +15,7 @@ import recent from './routes/recent';
|
|||
import search from './routes/search';
|
||||
import share from './routes/share';
|
||||
import itunesProxy from './routes/itunes-proxy';
|
||||
import errorHandler from './lib/error-handler';
|
||||
|
||||
const debug = debuglog('match.audio');
|
||||
|
||||
|
@ -22,6 +23,8 @@ process.env.VUE_ENV = 'server';
|
|||
|
||||
const app = koa();
|
||||
|
||||
app.use(errorHandler());
|
||||
|
||||
app.use(bodyparser());
|
||||
app.use(cors());
|
||||
app.use(compress({ flush: zlib.Z_SYNC_FLUSH }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue