Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psuhing to refresh #3

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;