🎉 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 PORT=3000
HREF="https://your.domain.com/" HREF="https://your.domain.com/"
+1 -1
View File
@@ -6,4 +6,4 @@ data.db-journal
*.db *.db
package-lock.json package-lock.json
yarn.lock yarn.lock
*.*~ *.*~
+5 -5
View File
@@ -1,4 +1,4 @@
require('dotenv').config() require('dotenv').config();
const express = require('express'); const express = require('express');
const path = require('path'); const path = require('path');
const session = require('express-session'); const session = require('express-session');
@@ -38,14 +38,14 @@ app.set('trust proxy', true);
app.use( app.use(
rateLimit({ rateLimit({
windowMs: 30 * 1000, windowMs: 30 * 1000,
max: 30, max: 30
}) })
); );
app.use( app.use(
'/login', '/login',
rateLimit({ rateLimit({
windowMs: 60 * 1000, windowMs: 60 * 1000,
max: 5, max: 5
}) })
); );
app.use(compression()); app.use(compression());
@@ -57,7 +57,7 @@ app.use(
session({ session({
resave: true, resave: true,
saveUninitialized: true, saveUninitialized: true,
secret: config.session_secret, secret: config.session_secret
}) })
); );
app.use(flash()); app.use(flash());
@@ -65,7 +65,7 @@ app.use(express.static(path.join(__dirname, 'public')));
app.use( app.use(
'/public', '/public',
serveStatic(path.join(__dirname, `public`), { serveStatic(path.join(__dirname, `public`), {
maxAge: '600000', maxAge: '600000'
}) })
); );
app.use('*', (req, res, next) => { app.use('*', (req, res, next) => {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "message-pusher", "name": "message-pusher",
"version": "0.2.0", "version": "0.2.2",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "node ./app.js", "start": "node ./app.js",