node.js - now.js hosted node app crashes after a while -


i'm making bots discord using discord.js library , i'm hosting them on now.js. i've had annoying issues now.js hosting.

when try host app using now.js alone crashed before build finished after 5mn , prints

no open port found. make sure 'npm start' creates http server on port (any). 

so add http server using npm , create localhost server on build , launch bot @ same time using npm start command

http-server -p 8000 & node index 

when build works fine, scale 1 instance never sleeps , have no issue. after few days app crashes , prints that

09/05 08:44 pm (5d) killed 09/05 08:44 pm (5d) npm err! code elifecycle 09/05 08:44 pm (5d) npm err! errno 137 09/05 08:44 pm (5d) npm err! selfbot@0.1.0 now-start: `http-server -p 8000 & node index` 09/05 08:44 pm (5d) npm err! exit status 137 09/05 08:44 pm (5d) npm err!  09/05 08:44 pm (5d) npm err! failed @ selfbot@0.1.0 now-start script. 09/05 08:44 pm (5d) npm err! not problem npm. there additional logging output above. 

from error understand issue http server getting stopped. , problem because means need restart app every few days. how can prevent that?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -