text: // Copyright IBM Corp. 2018,2019. All Rights Reserved.
  // Node module: @loopback/example-hello-world
  // This file is licensed under the MIT License.
  // License text available at https://opensource.org/licenses/MIT
  
  const application = require('./dist');
  
  module.exports = application;
  
  if (require.main === module) {
    // Run the application
    const config = {
      rest: {
        port: +process.env.PORT || 3000,
        host: process.env.HOST || 'localhost',
        openApiSpec: {
          // useful when used with OpenAPI-to-GraphQL to locate your application
          setServersFromRequest: true,
        },
      },
    };
    application.main(config).catch(err => {
      console.error('Cannot start the application.', err);
      process.exit(1);
    });
  }
  