personal_website/routes/api/apiRouter.js
2023-09-25 20:27:40 +02:00

19 lines
594 B
JavaScript

var express = require('express');
var router = express.Router();
var photosRouter = require('./photoRouter');
var mediaRouter = require('./mediaRouter');
var gameRouter = require('./gameRouter');
var cashTransactionRouter = require('./cashTransactionRouter');
router.use('/photos', photosRouter);
router.use('/games', gameRouter);
router.use('/movies', mediaRouter);
router.use('/series', mediaRouter);
router.use('/cash', cashTransactionRouter);
router.get('/', function (req, res, next) {
res.status(200).json({message: 'API is working'});
});
module.exports = router;