// server.js
import express from "express";
import cors from "cors";
import dotenv from "dotenv";
import dataRoutes from "./routes/dataRoutes.js";
import inventoryRoutes from "./routes/inventoryRoutes.js";

dotenv.config();

const app = express();

app.use(cors());
app.use(express.json());

// Use the itemLookupRoute with a base path, e.g., '/api'
app.use("/api/data", dataRoutes);
app.use("/api/inventory", inventoryRoutes);

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));
