small fixes
s-ol
1 year, 8 months ago
1 | 1 |
"name": "fedidag-client",
|
2 | 2 |
"version": "0.0.1",
|
3 | 3 |
"scripts": {
|
4 | |
"start": "API_PREFIX=http://localhost:3000 webpack serve -w --host 0.0.0.0",
|
|
4 |
"start": "API_PREFIX=http://localhost:3000 webpack serve --host 0.0.0.0",
|
5 | 5 |
"build": "webpack --config ./webpack.config.js --mode production --progress"
|
6 | 6 |
},
|
7 | 7 |
"babel": {
|
24 | 24 |
},
|
25 | 25 |
plugins: [
|
26 | 26 |
new webpack.EnvironmentPlugin({
|
27 | |
NODE_ENV: 'production',
|
28 | 27 |
DEBUG: false,
|
29 | 28 |
PUBLIC_URL: null,
|
30 | 29 |
API_PREFIX: null,
|
14 | 14 |
const app = express();
|
15 | 15 |
|
16 | 16 |
if (DEBUG) {
|
17 | |
app.use(cors({
|
18 | |
origin: 'http://localhost:8080',
|
19 | |
credentials: true,
|
20 | |
}));
|
|
17 |
app.use(cors({ origin: true, credentials: true }));
|
21 | 18 |
app.use(express.static('../client/dist/'));
|
22 | 19 |
} else {
|
23 | 20 |
app.use(express.static('static'));
|