0.7.3 - Even more better logging

pull/29/head releases/0.7.3
tycrek 3 years ago
parent 8999111507
commit 2a0bd6b886
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -7,7 +7,7 @@ try {
}
// Load the config
const { host, port, useSsl, diskFilePath, isProxied } = require('./config.json');
const { host, port, useSsl, diskFilePath, isProxied, s3enabled } = require('./config.json');
//#region Imports
const fs = require('fs-extra');
@ -53,6 +53,9 @@ app.disable('x-powered-by');
app.set('trust proxy', isProxied);
app.set('view engine', 'pug');
// Express logger middleware
app.use(log.express(true));
// Helmet security middleware
app.use(helmet.noSniff());
app.use(helmet.ieNoOpen());
@ -90,9 +93,10 @@ app.use(([err, , res,]) => {
});
// Host the server
app.listen(port, host, () => {
log.info('Users', `${Object.keys(users).length}`)
.info('Files', `${data.size}`)
.blank()
.info('Listening on', `${host}:${port}`, `${ASS_PREMIUM.enabled ? `frontend: ${getTrueHttp()}${getTrueDomain()}${ASS_PREMIUM.endpoint}` : ''}`);
});
log
.info('Users', `${Object.keys(users).length}`)
.info('Files', `${data.size}`)
.info('Frontend', ASS_PREMIUM.enabled ? ASS_PREMIUM.brand : 'disabled', `${ASS_PREMIUM.enabled ? `${getTrueHttp()}${getTrueDomain()}${ASS_PREMIUM.endpoint}` : ''}`)
.info('Index redirect', ASS_PREMIUM.enabled && ASS_PREMIUM.index ? `enable` : 'disabled')
.blank()
.express().Host(app, port, host, () => log.success('Ready for uploads', `Storing resources ${s3enabled ? 'in S3' : 'on disk'}`));

4
package-lock.json generated

@ -1,12 +1,12 @@
{
"name": "ass",
"version": "0.7.2",
"version": "0.7.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ass",
"version": "0.7.2",
"version": "0.7.3",
"license": "ISC",
"dependencies": {
"@tycrek/ass-storage-engine": "0.2.6",

@ -1,6 +1,6 @@
{
"name": "ass",
"version": "0.7.2",
"version": "0.7.3",
"description": "The superior self-hosted ShareX server",
"main": "ass.js",
"engines": {

Loading…
Cancel
Save