自动启动解析服务器

时间:2017-05-10 01:47:07

标签: ubuntu parse-platform digital-ocean parse-server

解析服务器上的服务器自动启动。我如何使用数字海洋ubuntu为解析服务器添加自动启动或始终打开。我需要通过打开终端并添加下面的代码来启动应用程序

cd parse-server-example 
npm start 

parse-dashboard --config config.json --allowInsecureHTTP=1

我在我的服务器上使用ubuntu

3 个答案:

答案 0 :(得分:1)

您可以使用this article中提到的pm2:

pm2 start index.js
pm2 startup
pm2 save

答案 1 :(得分:0)

有几种解决方案。您可以使用Docker:https://scotch.io/tutorials/how-to-host-a-node-js-app-on-digital-ocean

您也可以使用类似于Digital Ocean的指南来托管生产应用程序,但不是hello.js您需要一个为您的解析服务器调用npm start的bash脚本。 https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

答案 2 :(得分:0)

我们相对成功地使用pm2。 (我不是那个设置它的人所以不能评论易用性)

http://pm2.keymetrics.io/