Skip to content
Snippets Groups Projects
Select Git revision
  • 39778701afcbd2a4bfcdfcf42b0edfa6104048d7
  • master default protected
  • hugo-member-color
  • hugo-member-name
  • https_mixed_content
5 results

node.js

Blame
  • run.js 602 B
    "use strict";
    
    const co = require('co');
    
    // Inject 'webstart' command if no argument was given
    if (process.argv.length === 2) {
      process.argv.push('direct_webstart');
    }
    
    process.on('uncaughtException', (err) => {
      // Dunno why this specific exception is not caught
      if (err.code !== "EADDRNOTAVAIL" && err.code !== "EINVAL" && err.code !== "ENOENT") {
        console.error(err)
        process.exit(2);
      }
    })
    
    const stack = require('duniter').statics.autoStack([{
      name: 'duniter-ui',
      required: require('./index')
    }]);
    
    co(function*() {
      yield stack.executeStack(process.argv);
      process.exit();
    });