Refine and cleanup

This commit is contained in:
KS Jannette
2026-02-13 10:42:37 -05:00
parent 02affb154c
commit 6b7324c320
10 changed files with 1306 additions and 20 deletions

View File

@@ -1,13 +1,13 @@
import express from 'express';
import cors from 'cors';
import notesRoutes from './routes/notes.routes.js';
import router from './routes/notes.routes.js';
const app = express();
app.use(cors());
app.use(express.json());
app.use('/v1/notes', notesRoutes);
app.use('/v1/notes', router);
app.use((req, res) => {
res.status(404).json({ error: `Requested path is invalid or does not exist: ${req.method} ${req.originalUrl}` });