include changes

This commit is contained in:
StevanFreeborn
2022-06-19 16:42:02 -05:00
parent 41e93dd5f4
commit 58f3c0e930
7 changed files with 31 additions and 85 deletions
+8 -1
View File
@@ -51,7 +51,14 @@ export default class App extends Component {
}
async populateWeatherData() {
const response = await fetch('https://criminalminds-server.azurewebsites.net/weatherforecast');
const url = '/api/seasons';
if (process.env.NODE_ENV == 'production') {
url = 'https://criminalminds-server.azurewebsites.net' + url;
}
const response = await fetch(url);
const data = await response.json();
this.setState({ forecasts: data, loading: false });
}
+1 -1
View File
@@ -1,7 +1,7 @@
const { createProxyMiddleware } = require('http-proxy-middleware');
const context = [
"/weatherforecast",
'/api/seasons'
];
module.exports = function (app) {