Skip to content

Commit

Permalink
fix(express): use cors in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Awk34 committed Jun 17, 2018
1 parent 44edd64 commit cf3c5e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/app/server/config/express.js
Expand Up @@ -2,8 +2,6 @@
* Express configuration
*/

'use strict';

import express from 'express';
import favicon from 'serve-favicon';
import morgan from 'morgan';
Expand Down Expand Up @@ -31,6 +29,7 @@ export default function(app) {

if(env === 'development' || env === 'test') {
app.use(express.static(path.join(config.root, '.tmp')));
app.use(require('cors')());
}

if(env === 'production') {
Expand Down

0 comments on commit cf3c5e5

Please sign in to comment.