restructured - added data and inventory routes/controllers

This commit is contained in:
2024-03-21 13:35:47 -05:00
parent 31939aaffe
commit ab2b011580
5 changed files with 19 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
import express from "express";
import cors from "cors";
import dotenv from "dotenv";
import itemLookupRoute from "./routes/itemLookup.js"; // Named after the route file
import dataRoutes from "./routes/dataRoutes.js";
dotenv.config();
@@ -12,7 +12,7 @@ app.use(cors());
app.use(express.json());
// Use the itemLookupRoute with a base path, e.g., '/api'
app.use("/api", itemLookupRoute);
app.use("/api/data", dataRoutes);
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));