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 // Load the config
const { host, port, useSsl, diskFilePath, isProxied } = require('./config.json'); const { host, port, useSsl, diskFilePath, isProxied, s3enabled } = require('./config.json');
//#region Imports //#region Imports
const fs = require('fs-extra'); const fs = require('fs-extra');
@ -53,6 +53,9 @@ app.disable('x-powered-by');
app.set('trust proxy', isProxied); app.set('trust proxy', isProxied);
app.set('view engine', 'pug'); app.set('view engine', 'pug');
// Express logger middleware
app.use(log.express(true));
// Helmet security middleware // Helmet security middleware
app.use(helmet.noSniff()); app.use(helmet.noSniff());
app.use(helmet.ieNoOpen()); app.use(helmet.ieNoOpen());
@ -90,9 +93,10 @@ app.use(([err, , res,]) => {
}); });
// Host the server // Host the server
app.listen(port, host, () => { log
log.info('Users', `${Object.keys(users).length}`) .info('Users', `${Object.keys(users).length}`)
.info('Files', `${data.size}`) .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() .blank()
.info('Listening on', `${host}:${port}`, `${ASS_PREMIUM.enabled ? `frontend: ${getTrueHttp()}${getTrueDomain()}${ASS_PREMIUM.endpoint}` : ''}`); .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", "name": "ass",
"version": "0.7.2", "version": "0.7.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ass", "name": "ass",
"version": "0.7.2", "version": "0.7.3",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@tycrek/ass-storage-engine": "0.2.6", "@tycrek/ass-storage-engine": "0.2.6",

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

Loading…
Cancel
Save