Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
larvitadmingui
Advanced tools
node.js admin GUI
npm i larvitadmingui;
In your app, start the admin interface like this:
'use strict';
const Intercom = require('larvitamintercom'),
UserLib = require('larvituser'),
winston = require('winston'),
log = winston.createLogger({'transports': [new winston.transports.Console()]}),
App = require('larvitadmingui'),
db = require('larvitdb');
let userLib,
app;
db.setup(...); // See https://github.com/larvit/larvitdb on how to configure the database
userLib = new UserLib({
'db': db,
'log': log,
'mode': 'master',
'intercom': new Intercom({'conStr': 'loopback interface', 'log': log})
});
app = new App({
'port': 8001, // Listening port
'userLib': userLib,
'log': log,
'db': db
});
Start it up and check your browser at http://127.0.0.1:8001 - be sure to setup your MySQL or MariaDB correctly with your database settings in this file.
'use strict';
exports.run = function(req, res, cb) {
const data = {'global': res.globalData};
data.global.messages = ['Happy message'];
data.global.errors = ['Sad message'];
cb(null, req, res, data);
};
To set messages to the next page load, do this:
if ( ! req.session.data.nextCallData)
req.session.data.nextCallData = {};
req.session.data.nextCallData = {'global': {'messages': ['Happy message']}};
// or
req.session.data.nextCallData = {'global': {'errors': ['Sad message']}};
These will be loaded on the next page load, and then erased again.
FAQs
Generic admin GUI
We found that larvitadmingui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.