Пишем Телеграм-бота для отслеживания попадания IP или домена в реестр РКН

Енот
Новичек
Регистрация
29 Сен 2019
Сообщения
202
#26
Устанавливаете NodeJS, потом выполняете инструкцию, потом смотрите логи: pm2 logs
Код:
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] online
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] online
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T16:54:29: PM2 log: App [index:0] online
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] online
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] online
PM2        | 2019-11-16T16:54:30: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T16:54:30: PM2 log: Script /home/bot/index.js had too many unstable restarts (16). Stopped. "errored"
 
Енот
Новичек
Регистрация
29 Сен 2019
Сообщения
202
#30
Код:
PM2        | 2019-11-16T19:35:19: PM2 log: App [index:0] online
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] online
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] online
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T19:35:20: PM2 log: App [index:0] online
PM2        | 2019-11-16T19:35:21: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T19:35:21: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2019-11-16T19:35:21: PM2 log: App [index:0] online
PM2        | 2019-11-16T19:35:21: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2019-11-16T19:35:21: PM2 log: Script /home/bot/index.js had too many unstable restarts (16). Stopped. "errored"
опять не работает!
 
Енот
Новичек
Регистрация
29 Сен 2019
Сообщения
202
#33
Запустите так: node /home/bot/index.js
Код:
SyntaxError: Invalid or unexpected token
    at Module._compile (internal/modules/cjs/loader.js:892:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11
 
Думает, что помогает
Регистрация
15 Дек 2017
Сообщения
3,561
#34
Из этого непонятно, что за ошибка.