This commit is contained in:
viviannTam
2024-01-30 14:48:17 +08:00
parent 9a5e128f3f
commit 31fe6b3c7c
11 changed files with 91 additions and 164 deletions

View File

@@ -1,10 +1,7 @@
const express = require("express");
const { rateLimit } = require("express-rate-limit");
const path = require("path");
const router = require('./routes/user');
const errorHandler = require('./utils/errorHandler');
const app = express();
const ejs = require("ejs");
module.exports = app;
@@ -96,14 +93,3 @@ app.use(function (err, req, res, next) {
});
}
});
//reset password logic
app.use("/api/user", router)
app.use(errorHandler);
const PORT = 3000;
app.listen(PORT, () => {
console.log('server running on port ' + PORT);
});