简体   繁体   English

NodeJS上的Aurelia捆绑和生产部署

[英]Aurelia bundling and production deployment on NodeJS

I am new to Aurelia. 我是Aurelia的新手。 I am able to run the Aurelia app using 'gulp watch' in local system. 我可以在本地系统中使用'gulp watch'运行Aurelia应用程序。 Now I want to put the Aurelia app in an external server which has NodeJS installed. 现在我想将Aurelia应用程序放在安装了NodeJS的外部服务器上。 I used 'gulp bundle' to create dist folder entries. 我使用'gulp bundle'来创建dist文件夹条目。 What are the next steps in deploying after bundling? 捆绑后部署的后续步骤是什么? Aurelia official documentation doesn't explain after bundling steps. Aurelia官方文档在捆绑步骤后没有解释。

只需运行gulp export然后将导出文件夹复制并粘贴到服务器即可。

The reason Aurelia documentation stops here is because this is as far as Aurelia goes. Aurelia文档在此处停止的原因是因为这是Aurelia所做的。 Aurelia is a framework for building applications. Aurelia是一个用于构建应用程序的框架。 You will need a resource for hosting applications at this point. 此时您将需要一个用于托管应用程序的资源。

If your application consists exclusively of your Aurelia application--that is, if you have no server behind it, you might consider static file hosting, since Aurelia files are static javascript files. 如果您的应用程序完全由您的Aurelia应用程序组成 - 也就是说,如果您没有服务器,则可以考虑静态文件托管,因为Aurelia文件是静态javascript文件。 Here are some resources you might find helpful. 以下是您可能会发现有用的一些资源。

Note that you do not want to use gulp watch in a production environment. 请注意,您希望在生产环境中使用gulp watch The default gulp watch command leverages a node-based development server (browser-sync at the time of writing) which that both slows down your server and adds unwanted behavior. 默认的gulp watch命令利用基于节点的开发服务器(编写时的浏览器同步),这会降低服务器速度并增加不需要的行为。

IIS (Windows Server) IIS(Windows Server)

nginx (Linux server) nginx(Linux服务器)

node-based (any server) 基于节点(任何服务器)

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

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