🎉 update format

This commit is contained in:
JustSong
2022-07-17 20:21:49 +08:00
parent 18dfc865ca
commit 5d1a9e4b72
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
PORT=3000
HREF="https://your.domain.com/"
HREF="https://your.domain.com/"
+1 -1
View File
@@ -6,4 +6,4 @@ data.db-journal
*.db
package-lock.json
yarn.lock
*.*~
*.*~
+5 -5
View File
@@ -1,4 +1,4 @@
require('dotenv').config()
require('dotenv').config();
const express = require('express');
const path = require('path');
const session = require('express-session');
@@ -38,14 +38,14 @@ app.set('trust proxy', true);
app.use(
rateLimit({
windowMs: 30 * 1000,
max: 30,
max: 30
})
);
app.use(
'/login',
rateLimit({
windowMs: 60 * 1000,
max: 5,
max: 5
})
);
app.use(compression());
@@ -57,7 +57,7 @@ app.use(
session({
resave: true,
saveUninitialized: true,
secret: config.session_secret,
secret: config.session_secret
})
);
app.use(flash());
@@ -65,7 +65,7 @@ app.use(express.static(path.join(__dirname, 'public')));
app.use(
'/public',
serveStatic(path.join(__dirname, `public`), {
maxAge: '600000',
maxAge: '600000'
})
);
app.use('*', (req, res, next) => {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "message-pusher",
"version": "0.2.0",
"version": "0.2.2",
"private": true,
"scripts": {
"start": "node ./app.js",