Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for KuCalc : devops.
Download
50665 views
1
console.time('start');
2
var flatiron = require('../../lib/flatiron'),
3
app = flatiron.app;
4
5
require('pkginfo')(module, 'version');
6
7
app.version = exports.version;
8
9
app.use(flatiron.plugins.cli, {
10
dir: __dirname,
11
usage: [
12
'Simple app example for flatiron!',
13
'',
14
'app start - print a prompt and arguments',
15
'print <msg> - echo a message'
16
],
17
version: true
18
});
19
20
app.cmd('app start', function () {
21
console.timeEnd('start');
22
console.dir('it works!!!');
23
app.prompt.get('name', function (err, name) {
24
console.dir(arguments);
25
})
26
})
27
28
app.start();
29
30