Help me to deployment node-red in cyclic.sh

hi I cant deployment node-red

2023-07-10 11:28:33.132: 10 Jul 10:28:33 - [info] 

Welcome to Node-RED
===================

2023-07-10 11:28:33.133: 10 Jul 10:28:33 - [info] Node-RED version: v3.0.2
2023-07-10 11:28:33.133: 10 Jul 10:28:33 - [info] Node.js  version: v16.20.0
2023-07-10 11:28:33.133: 10 Jul 10:28:33 - [info] Linux 4.14.255-311-248.529.amzn2.x86_64 x64 LE
 Listening ...

this my file
package.json

{
  "name": "node_heuo",
  "version": "0.0.7",
  "engines": {
    "node": "16.x"
  },
  "dependencies": {
    "child_process": "latest",
    "express": "latest",
    "feedparser": "latest",
    "moment": "latest",
    "nano": "latest",
    "node-red": "latest",
    "node-red-contrib-actionflows": "latest",
    "node-red-contrib-aedes": "latest",
    "node-red-contrib-cron-plus": "latest",
    "node-red-contrib-cx-mqtt-one": "latest",
    "node-red-contrib-loadbalance": "latest",
    "node-red-contrib-message-queue": "latest",
    "node-red-contrib-mongodb4-dynamic": "latest",
    "node-red-contrib-msg-router": "latest",
    "node-red-contrib-prib-functions": "latest",
    "node-red-contrib-routing": "latest",
    "node-red-contrib-simple-message-queue": "latest",
    "node-red-contrib-storage-mongodb": "latest",
    "node-red-contrib-telegrambot": "latest",
    "node-red-contrib-timeout": "latest",
    "node-red-debugger": "latest",
    "node-red-node-data-generator": "latest",
    "redis": "latest",
    "when": "latest"
  },
  "scripts": {
    "start": "node index.js"
  }
}

index.js:

var http = require('http');
var express = require('express');
var RED = require('node-red');

//env
//console.log(process.env);
var PASS = process.env.PASS2;
var host = process.env.DBHOST || 's8ptv';
var mongouri = process.env.DBURL || 'mongodb+srv://' + process.env.DBUSER + ':' + process.env.DBPASS + '@cluster0.' + host + '.mongodb.net/nrServer';
var appname = process.env.NRNS + '_' + process.env.APPID || 'default_node';
console.log(mongouri + ' | ' + appname);

// Create an Express app
var app = express();

// Add a simple route for static content served from 'public'
app.use('/', express.static('public'));

// Create a server
var server = http.createServer(app);

// Create the settings object - see default settings.js file for other options
var settings = {
  exportGlobalContextKeys: true,
  httpAdminRoot: '/admin',
  httpNodeRoot: '/',
  userDir: '/var/task',
  functionGlobalContext: {},
  adminAuth: {
    type: 'credentials',
    users: [
      {
        username: 'demo',
        password: PASS,
        permissions: '*',
      },
    ],
  },
  // enables global context
  exportGlobalContextKeys: true,
  externalModules: {
    autoInstall: true /** Whether the runtime will attempt to automatically install missing modules */,
    autoInstallRetry: 30 /** Interval, in seconds, between reinstall attempts */,
    palette: {
      /** Configuration for the Palette Manager */
      allowInstall: true /** Enable the Palette Manager in the editor */,
      allowUpload: true /** Allow module tgz files to be uploaded and installed */,
      allowList: ['*'],
      denyList: [],
    },
    modules: {
      /** Configuration for node-specified modules */ allowInstall: true,
      allowList: ['*'],
      denyList: [],
    },
  },
  editorTheme: {
    /** The following property can be used to set a custom theme for the editor.
     * See https://github.com/node-red-contrib-themes/theme-collection for
     * a collection of themes to chose from.
     */
    //theme: "",
    palette: {
      /** The following property can be used to order the categories in the editor
       * palette. If a node's category is not in the list, the category will get
       * added to the end of the palette.
       * If not set, the following default order is used:
       */
      //categories: ['subflows', 'common', 'function', 'network', 'sequence', 'parser', 'storage'],
    },
    projects: {
      /** To enable the Projects feature, set this value to true */
      enabled: false,
      workflow: {
        /** Set the default projects workflow mode.
         *  - manual - you must manually commit changes
         *  - auto - changes are automatically committed
         * This can be overridden per-user from the 'Git config'
         * section of 'User Settings' within the editor
         */
        mode: 'manual',
      },
    },
    codeEditor: {
      /** Select the text editor component used by the editor.
       * Defaults to "ace", but can be set to "ace" or "monaco"
       */
      lib: 'monaco',
      options: {
        /** The follow options only apply if the editor is set to "monaco"
         *
         * theme - must match the file name of a theme in
         * packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
         * e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
         */
        theme: 'hc-black',
        /** other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc.
         * for the full list, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandaloneeditorconstructionoptions.html
         */
        //fontSize: 14,
        //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
        //fontLigatures: true,
      },
    },
  },
  functionExternalModules: true,

  storageModule: require('node-red-contrib-storage-mongodb'), //node-red-contrib-storage-mongodb
  mongodbSettings: {
    //mongoURI: "mongodb://mongodb/nodered",
    //mongoURI: "mongodb+srv://user:pass@cluster0.cqm6vi1.mongodb.net/nodered",
    //mongodb+srv://user:<password>@cluster0.s8ptv.mongodb.net/?retryWrites=true&w=majority
    //host: cqm6vi1, s8ptv
    mongoURI: mongouri,
    appname: appname,
  },
};

// Initialise the runtime with a server and settings
RED.init(server, settings);

// Serve the editor UI from /red
app.use(settings.httpAdminRoot, RED.httpAdmin);

// Serve the http nodes UI from /api
app.use(settings.httpNodeRoot, RED.httpNode);
console.log("open port");
server.listen(3000);

// Start the runtime
RED.start();

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.