adding basic user controller and model as well as updating user route

This commit is contained in:
Will Baumbach
2025-07-25 14:44:19 -05:00
parent 067ab0647b
commit 11afa68c09
7 changed files with 404 additions and 7 deletions

View File

@@ -1,10 +1,11 @@
import express from 'express';
import { createUser, getAllUsers } from './../controllers/usersController.js';
const router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
router
.route('/')
.get(getAllUsers)
.post(createUser);
export default router;