Skip to content

Commit

Permalink
Merge pull request #3 from Hossain2024/connect_to_db
Browse files Browse the repository at this point in the history
psuhing to refresh
  • Loading branch information
Hossain2024 authored Mar 4, 2025
2 parents 7c249a6 + 2cc4d98 commit c52918d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions EmployeeManagementBackend/node_modules/.bin 2/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions EmployeeManagementBackend/node_modules/.bin 2/nodemon

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions EmployeeManagementBackend/node_modules/.bin 2/nodetouch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions EmployeeManagementBackend/node_modules/.bin 2/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion EmployeeManagementBackend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ app.get('/Email', (req, res)=> {
return res.json(data);
})
})
app.listen(8081

/**
* Add an
24 changes: 23 additions & 1 deletion EmployeeManagementSystem/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,26 @@ function App() {
const [data, setData] = useState([]);

useEffect(() => {
fetch('http:/
fetch('http://localhost:8081/Email')
.then((res) => res.json())
.then((data) => setData(data))
.catch((err) => console.error('Error fetching data:', err));
}, []);

return (
<div>
<h1>Employee Emails</h1>
<ul>
{data.map((item) => (
<li key={item.EmployeeID}>
<strong>Email:</strong> {item.EmailAdress} <br />
<strong>Employee ID:</strong> {item.EmployeeID} <br />
<strong>Type:</strong> {item.Type}
</li>
))}
</ul>
</div>
);
}

export default App;

0 comments on commit c52918d

Please sign in to comment.