简体   繁体   English

我可以捆绑和迁移可以在不带node.js的apache服务器上运行的独立Aurelia App吗?

[英]Can I bundle and migrate a standalone Aurelia App that can run on apache server without node.js?

First of I am new to Aurelia and has just completed a real world project on my development server which I like to run concurrently with WordPress which needs PHP. 首先,我是Aurelia的新手,刚刚在我的开发服务器上完成了一个真实世界的项目,我想与需要PHP的WordPress并发运行。 Back in the days with angular 1.x I used to gulp all the angular dependencies and scripts into a single file and transfer it to the server, which I thought would be the case with Aurelia too but looks like it is more complex in this matter. 在使用angular 1.x的日子里,我曾经将所有角度依赖项和脚本吞入一个文件并将其传输到服务器,我认为Aurelia也是这种情况,但看起来在这件事上它更加复杂。 So please if any one has come around to this problem, any help would be appericated like how can I port Aurelia project to apache server without serving it through node. 因此,如果有人遇到此问题,请给予任何帮助,例如我如何将Aurelia项目移植到apache服务器而不通过节点提供服务。 Or is it possible to run node and apache on same server. 或者可以在同一服务器上运行node和apache。

You don't need to run Node to serve your application. 您无需运行Node即可为您的应用程序提供服务。 Any web server - such as Apache - will do. 任何Web服务器(例如Apache)都可以。 You only need to bundle your application and upload the files to your server. 您只需要捆绑应用程序并将文件上传到服务器即可。

If your project was created using the CLI, the application is bundled automatically every time you run au run (or au build ), so you can simply upload the scripts directory and the index.html file. 如果您的项目是使用CLI创建的,则每次您运行au run (或au build )时,应用程序都会自动捆绑在一起,因此您只需上载scripts目录和index.html文件。 This is the minimum; 这是最低要求; you may need to upload also CSS, images or fonts, depending on your app. 您可能还需要上传CSS,图像或字体,具体取决于您的应用。

If your project is based on one of the skeletons, you can bundle your app by running gulp bundle , then upload the dist directory, the jspm_packages directory, the config.js file and the index.html file, plus anny other asset (CSS, images, etc.) you may need. 如果您的项目基于其中一个框架,则可以通过运行gulp bundle应用程序,然后上传dist目录, jspm_packages目录, config.js文件和index.html文件,以及其他资产(CSS,图片等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM