All checks were successful
Anatid Blog CI Workflow / test (./backend) (push) Successful in 31s
Anatid Blog CI Workflow / test (./frontend) (push) Successful in 31s
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Successful in 50s
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Successful in 45s
Anatid Blog CI Workflow / deploy (push) Successful in 22s
31 lines
699 B
TypeScript
31 lines
699 B
TypeScript
import React, { useEffect, useState } from 'react';
|
|
import axios from 'axios';
|
|
import logo from './logo.svg';
|
|
import './App.css';
|
|
|
|
function App() {
|
|
const [message, setMessage] = useState('');
|
|
|
|
useEffect(() => {
|
|
axios.get('http://anatid-blog-backend:3000/')
|
|
.then(response => {
|
|
setMessage(response.data);
|
|
})
|
|
.catch(error => {
|
|
console.error('There was an error fetching the data.', error);
|
|
});
|
|
}, []);
|
|
|
|
return (
|
|
<div className="App">
|
|
<header className="App-header">
|
|
<img src={logo} className="App-logo" alt="logo" />
|
|
<h2>React is working</h2>
|
|
<p>{message}</p>
|
|
</header>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default App;
|