How to use @iofog/ecn-viewer - 1 common examples

To help you get started, we’ve selected a few @iofog/ecn-viewer 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 eclipse-iofog / Controller / src / server.js View on Github external
logger.info(`==> 🌎 HTTPS API server listening on port ${ports.api}. Open up https://localhost:${ports.api}/ in your browser.`)
      jobs.forEach((job) => job.run())
    })
  } catch (e) {
    logger.error('ssl_key or ssl_cert or intermediate_cert is either missing or invalid. Provide valid SSL configurations.')
  }
}

const devMode = config.get('Server:DevMode')
const apiPort = config.get('Server:Port')
const viewerPort = process.env.VIEWER_PORT || config.get('Viewer:Port')
const sslKey = config.get('Server:SslKey')
const sslCert = config.get('Server:SslCert')
const intermedKey = config.get('Server:IntermediateCert')

viewerApp.use('/', ecnViewer.middleware(express))

const isDaemon = process.argv[process.argv.length - 1] === 'daemonize2'

const initState = async () => {
  if (!isDaemon) {
    // InitDB
    try {
      await db.initDB()
    } catch (err) {
      logger.error('Unable to initialize the database.', err)
      process.exit(1)
    }

    // Store PID to let deamon know we are running.
    jobs.push({
      run: () => {

@iofog/ecn-viewer

Eclipse ioFog Edge Cloud Network Viewer project Copyright (c) 2019 Edgeworx, Inc.

EPL-2.0
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis

Popular @iofog/ecn-viewer functions

Similar packages