include changes
This commit is contained in:
+8
-1
@@ -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,7 +1,7 @@
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
|
||||
const context = [
|
||||
"/weatherforecast",
|
||||
'/api/seasons'
|
||||
];
|
||||
|
||||
module.exports = function (app) {
|
||||
|
||||
Reference in New Issue
Block a user