clean up unused pages, update package info from defaults
This commit is contained in:
parent
536282e288
commit
9a83064c08
42
app.js
42
app.js
@ -2,31 +2,6 @@ const express = require('express');
|
|||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
//const winston = require('winston');
|
|
||||||
//const rateLimit = require('express-rate-limit');
|
|
||||||
|
|
||||||
//const logger = winston.createLogger({
|
|
||||||
// level: 'info',
|
|
||||||
// format: winston.format.combine(
|
|
||||||
// winston.format.timestamp(),
|
|
||||||
// winston.format.printf(({ timestamp, level, message }) => {
|
|
||||||
// return `${timestamp} [${level.toUpperCase()}] ${message}`;
|
|
||||||
// })
|
|
||||||
// ),
|
|
||||||
// transports: [
|
|
||||||
// new winston.transports.File({ filename: 'register.log' })
|
|
||||||
// ],
|
|
||||||
//});
|
|
||||||
|
|
||||||
//const exclusions = JSON.parse(fs.readFileSync('exclusions.json', 'utf8')).excludedIPs;
|
|
||||||
//const registerLimiter = rateLimit({
|
|
||||||
// windowMs: 24 * 60 * 60 * 1000,
|
|
||||||
// max: 1,
|
|
||||||
// message: 'You have already submitted a registration today. Please try again tomorrow.',
|
|
||||||
// standardHeaders: true,
|
|
||||||
// legacyHeaders: false,
|
|
||||||
// skip: (req, res) => exclusions.includes(req.ip)
|
|
||||||
//});
|
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
@ -41,23 +16,6 @@ app.get('/', (req, res) => {
|
|||||||
res.render('index', { currentPage: 'home' });
|
res.render('index', { currentPage: 'home' });
|
||||||
});
|
});
|
||||||
|
|
||||||
//app.post('/register', registerLimiter, (req, res) => {
|
|
||||||
// const formData = req.body;
|
|
||||||
// logger.info(`New registration:
|
|
||||||
// Name: ${formData.name}
|
|
||||||
// Email: ${formData.email}
|
|
||||||
// Reason: ${formData.message}
|
|
||||||
// Telegram: ${formData.telegram}`);
|
|
||||||
// res.render('success');
|
|
||||||
//});
|
|
||||||
|
|
||||||
// Shelved for now
|
|
||||||
// Logic needs improvements
|
|
||||||
|
|
||||||
//app.get('/success', (req, res) => {
|
|
||||||
// res.render('success');
|
|
||||||
//});
|
|
||||||
|
|
||||||
app.get('/services', (req, res) => {
|
app.get('/services', (req, res) => {
|
||||||
res.render('services', { currentPage: 'services' });
|
res.render('services', { currentPage: 'services' });
|
||||||
});
|
});
|
||||||
|
16
package.json
16
package.json
@ -7,13 +7,21 @@
|
|||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "ihatenodejs",
|
||||||
"license": "ISC",
|
"license": "CC0-1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.20.3",
|
"body-parser": "^1.20.3",
|
||||||
"ejs": "^3.1.10",
|
"ejs": "^3.1.10",
|
||||||
"express": "^4.21.1",
|
"express": "^4.21.1",
|
||||||
"express-rate-limit": "^7.4.1",
|
|
||||||
"winston": "^3.17.0"
|
"winston": "^3.17.0"
|
||||||
}
|
},
|
||||||
|
"devDependencies": {},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/ihatenodejs/pontus-mail.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/ihatenodejs/pontus-mail/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/ihatenodejs/pontus-mail#readme"
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
<%- include('shards/header', { title: 'Register - p0ntus mail' }) %>
|
|
||||||
<div class="container">
|
|
||||||
<%- include('shards/nav', { currentPage: 'register' }) %>
|
|
||||||
<i class="il mt-5">Register</i>
|
|
||||||
<hr>
|
|
||||||
<i>Please contact <a href="mailto:signup@p0ntus.com">signup<i class="fa-solid fa-at"></i>p0ntus.com</a> with the following info:</i>
|
|
||||||
<ul class="list-group mt-3">
|
|
||||||
<li class="list-group-item">Name that goes in email header (full name/username/alias)</li>
|
|
||||||
<li class="list-group-item">Desired email address (e.g., yourname@p0ntus.com)</li>
|
|
||||||
<li class="list-group-item">Reason for wanting an email</li>
|
|
||||||
<li class="list-group-item">Telegram username</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<%- include('shards/footer') %>
|
|
@ -1,9 +0,0 @@
|
|||||||
<%- include('shards/header', { title: 'p0ntus mail' }) %>
|
|
||||||
<div class="container">
|
|
||||||
<h1><i class="fa-solid fa-check-circle text-success"></i> Success</h1>
|
|
||||||
<h3>Your registration request has been submitted</h3>
|
|
||||||
<i>Thank you for registering on p0ntus mail. We will get back to you shortly :)</i>
|
|
||||||
<hr>
|
|
||||||
<a href="/" class="btn bg-dark text-white"><i class="fa-solid fa-home ico-sm"></i> Return to Home</a>
|
|
||||||
</div>
|
|
||||||
<%- include('shards/footer') %>
|
|
Reference in New Issue
Block a user