简体   繁体   English

在PHP项目中使用vue-cli输出?

[英]use vue-cli output in php project?

When I use vue-cli, I'll automatically create a local server. 使用vue-cli时,我将自动创建本地服务器。

My question is: Can I use the vue-cli output in php project (for example, app.js ) ? 我的问题是:我可以在php项目中使用vue-cli输出(例如app.js)吗?

What is the local network for? 本地网络有什么用? Is it going to help Frontend programmers? 它会帮助前端程序员吗?

I know, "devDependencies" (which probably includes this local server) did not work effectively in the final file. 我知道,“ devDependencies”(可能包括此本地服务器)在最终文件中无法有效工作。

thank you 谢谢

vue-cli gives you a simple HTTP server running on nodejs which is called Node.js static file server. vue-cli为您提供了一个在nodejs上运行的简单HTTP服务器,称为Node.js静态文件服务器。 It's main purpose is to help developers at development time. 它的主要目的是在开发时帮助开发人员。

For production you need a production server like Apache Web Server. 对于生产,您需要一个生产服务器,例如Apache Web Server。

Whether you need PHP or not depends on your application's nature. 是否需要PHP取决于应用程序的性质。 Many apps require server side rendering. 许多应用程序需要服务器端渲染。 If so, you need PHP. 如果是这样,则需要PHP。 If not, just copy the dist folder's content to Apache Web Server's hosting folder. 如果没有,只需将dist文件夹的内容复制到Apache Web Server的托管文件夹。

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

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