sockets work
This commit is contained in:
@ -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 ;
|
||||
|
Reference in New Issue
Block a user