Skip to content

Commit cf3c5e5

Browse files
committed
fix(express): use cors in dev
1 parent 44edd64 commit cf3c5e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: templates/app/server/config/express.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* Express configuration
33
*/
44

5-
'use strict';
6-
75
import express from 'express';
86
import favicon from 'serve-favicon';
97
import morgan from 'morgan';
@@ -31,6 +29,7 @@ export default function(app) {
3129

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

3635
if(env === 'production') {

0 commit comments

Comments
 (0)