diff --git a/api/package-lock.json b/api/package-lock.json index 19ab644..6bb6493 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -16,6 +16,7 @@ "mongodb": "^6.9.0", "mongoose": "^8.4.1", "path": "^0.12.7", + "sendgrid": "^5.2.3", "ts-node-dev": "^2.0.0", "uuid": "^10.0.0" }, diff --git a/api/package.json b/api/package.json index 1339d43..b224f89 100644 --- a/api/package.json +++ b/api/package.json @@ -22,6 +22,7 @@ "mongodb": "^6.9.0", "mongoose": "^8.4.1", "path": "^0.12.7", + "sendgrid": "^5.2.3", "ts-node-dev": "^2.0.0", "uuid": "^10.0.0" }, diff --git a/api/src/routes/user.ts b/api/src/routes/user.ts index 565fb07..4096d9a 100644 --- a/api/src/routes/user.ts +++ b/api/src/routes/user.ts @@ -3,6 +3,7 @@ import mongoose from "mongoose"; import dbConnect from "../config/db"; import sgMail from "@sendgrid/mail"; import User from "../model/User"; +// import { validateAccessToken } from "../controllers/auth0-middleware"; const router = express.Router(); diff --git a/api/src/server.ts b/api/src/server.ts index 62dbe00..7a21da4 100644 --- a/api/src/server.ts +++ b/api/src/server.ts @@ -21,8 +21,7 @@ app.use("/workshop", routes.workshop); connectDB(); -app.use("/api", router); // connect routes (prefix as api), what is the lin 7 logic for?: import * as routes from "./routes/index" +app.use("/user", routes.user); +app.use("/api", router); -app.listen(process.env.PORT || 8000, () => - console.log(`Server running on port ${process.env.PORT || 8000}`), -); +app.listen(process.env.PORT || 8000, () => console.log("Server running..."));