How to use the figlet.defaults function in figlet

To help you get started, we’ve selected a few figlet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liamray / nexl-js / nexl-server / nexl-server / nexl-server-utils.js View on Github external
function printStartupMessage(server) {
	if (!j79.isLogLevel('info')) {
		return;
	}

	figlet.defaults({fontPath: "assets/fonts"});

	console.log('');
	console.log(HR);
	figlet("nexl-server", function (err, data) {
		if (err) {
			throw 'Something went wrong...' + err
		}

		console.log(data);
		console.log(HR);
		var port = server.address().port;
		var address = server.address().address;
		console.log(chalk.green(util.format('\n%s', new Date())));
		console.log(chalk.green(util.format("NEXL server is up and listening at [%s:%s]", address, port)));
	});
}
github liamray / nexl-js / nexl-server / nexl-server / nexl-server.js View on Github external
function handleRootPage(req, res) {
	figlet.defaults({fontPath: "assets/fonts"});

	figlet("Welcome to nexl-server", function (err, data) {
		if (err) {
			nexlServerUtils.throw500Error('Something went wrong...' + err, res);
		}

		data = util.format('nexl-server version : %s\n%s', version, data);

		res.status(200);
		res.write(data);
		res.end();
	});
}

figlet

Creates ASCII Art from text. A full implementation of the FIGfont spec.

MIT
Latest version published 6 months ago

Package Health Score

76 / 100
Full package analysis