【问题标题】:Automatic start parse server自动启动解析服务器
【发布时间】:2017-05-10 01:47:06
【问题描述】:

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

cd parse-server-example 
npm start 

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

我在我的服务器上使用 ubuntu

【问题讨论】:

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


【解决方案1】:

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

pm2 start index.js
pm2 startup
pm2 save

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      【解决方案3】:

      我们使用 pm2 比较成功。 (我不是设置它的人,所以无法评论易用性)

      http://pm2.keymetrics.io/

      【讨论】:

        猜你喜欢
        • 2013-12-25
        • 1970-01-01
        • 2019-08-23
        • 2020-11-28
        • 2011-12-07
        • 1970-01-01
        • 1970-01-01
        • 2013-05-31
        • 1970-01-01
        相关资源
        最近更新 更多