From 5d1a9e4b72957e11519eb1dbd221f1e883e1d953 Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 17 Jul 2022 20:21:49 +0800 Subject: [PATCH] :tada: update format --- .env.example | 2 +- .gitignore | 2 +- app.js | 10 +++++----- package.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index da97b95..ac2c527 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,2 @@ PORT=3000 -HREF="https://your.domain.com/" +HREF="https://your.domain.com/" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 747fca8..95116d8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ data.db-journal *.db package-lock.json yarn.lock -*.*~ \ No newline at end of file +*.*~ diff --git a/app.js b/app.js index cc2a9e1..a37f99a 100644 --- a/app.js +++ b/app.js @@ -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) => { diff --git a/package.json b/package.json index d62e36c..2cb0792 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "message-pusher", - "version": "0.2.0", + "version": "0.2.2", "private": true, "scripts": { "start": "node ./app.js",