now using ES modules

This commit is contained in:
Karma Riuk
2025-04-28 10:12:50 +02:00
parent 630c7508a0
commit 83c53d6ed4
3 changed files with 11 additions and 10 deletions

View File

@ -1,14 +1,14 @@
const express = require('express');
const router = express.Router();
import { Router } from 'express';
const router = Router();
// Routes
router.get('/', (req, res) => {
res.json({ message: 'Welcome to the Express backend!' });
res.json({ message: 'Welcome to the Express backend!' });
});
// Example route
router.get('/api/hello', (req, res) => {
res.json({ message: 'Hello from the backend!' });
res.json({ message: 'Hello from the backend!' });
});
module.exports = router;
export default router;