sockets work

This commit is contained in:
2024-01-23 21:17:27 -05:00
parent 375ec679f2
commit e91bb70b33
7 changed files with 37 additions and 5 deletions

View File

@ -5,6 +5,7 @@ const app = express();
const port = 3000;
const ejs = require("ejs");
module.exports = app;
app.use(express.json());
app.set("json spaces", 2);
@ -17,6 +18,9 @@ const limiter = rateLimit({
legacyHeaders: false, // Disable the `X-RateLimit-*` headers.
});
// Hold list of functions to run when the server is ready
app.onListen = [function(){console.log('Express is ready')}];
// Apply the rate limiting middleware to all requests.
app.use(limiter);
@ -84,4 +88,3 @@ app.use(function (err, req, res, next) {
});
module.exports = app ;