Change messages' text

This commit is contained in:
2025-12-27 17:18:54 +03:00
parent 9c551af209
commit f1d1c2737a

View File

@@ -5,14 +5,19 @@ const PORT = process.env.PORT || 3000;
app.use(express.json());
app.get('/', (req, res) => {
res.json({ message: 'Server is running!', status: 'OK' });
res.json({
message: 'Hello, World!',
status: 'OK'
});
});
app.get('/health', (req, res) => {
res.status(200).json({ status: 'healthy', timestamp: new Date().toISOString() });
res.status(200).json({
status: 'healthy',
timestamp: new Date().toISOString()
});
});
// Example POST route
app.post('/api/data', (req, res) => {
const data = req.body;
res.json({
@@ -23,7 +28,7 @@ app.post('/api/data', (req, res) => {
});
app.use((req, res) => {
res.status(404).json({ error: 'Route not found' });
res.status(404).json({ error: 'Invalid route' });
});
app.use((err, req, res, next) => {