如何运行离子服务永久?离子

由网友(初吻给了烟)分享简介:我使用的离子框架一个应用程序。在code是一个Linux服务器上。我通过使用腻子离子服务命令运行的应用程序。I am using Ionic framework for one application. The code is on a linux server. I am running the applicati...

我使用的离子框架一个应用程序。在code是一个Linux服务器上。我通过使用腻子离子服务命令运行的应用程序。

I am using Ionic framework for one application. The code is on a linux server. I am running the application using ionic serve command through putty.

不过,问题是,如果我关闭应用程序停止腻子。有什么办法来运行离子永久作为一个守护进程?

But, the problem is if I close the putty the application is stopped. Is there any way to run the ionic serve permanently as a daemon process?

推荐答案

我怀疑你想,因为你要为你的应用程序离子作为一个Web应用程序要做到这一点,对不对?

I'm suspecting you're trying to do this because you want to serve your Ionic app as a web app, correct?

在这种情况下 - 你不必跑离子服务永久。所有你需要做的就是采取一切从 WWW 文件夹中的code,并将其放置在 HTTP 文件夹(或任何其它有效期为你的系统)您的Web服务器。

In that case - you don't have to run ionic serve permanently. All you have to do is take all the code from the www folder and place it in the http folder (or any other which is valid for your system) of your web server.

所以,基本上,旋转起来阿帕奇(或nginx的),并从离子的 WWW 文件夹服务于code。基本上,离子服务命令做同样的事情 - 它旋转了一个本地Web服务器,并提供从www文件夹的内容。它确实是更快的本地测试。

So, basically, spin up apache (or nginx) and serve the code from the Ionic's www folder. Basically, ionic serve command does the same thing - it spins up a local web server and serves the content from the www folder. It does that for faster local testing.

您可以看看这太问题了解如何部署离子作为一个网站的信息。

You can take a look at this SO question for more info on how to deploy Ionic as a website.

阅读全文

相关推荐

最新文章