mirror of
https://github.com/karma-riuk/crab-webapp.git
synced 2025-07-06 06:28:12 +02:00
now using ES modules
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user