简体   繁体   English

无头CMS访问wp-admin(nuxt.js + wordpress)

[英]Headless cms access wp-admin(nuxt.js + wordpress)

I have a problem. 我有个问题。 I installed the wordpress and enabled rest api. 我安装了wordpress并启用了REST API。 After that I built nuxt.js app. 之后,我构建了nuxt.js应用。

It starts at localhost:3000 (when I run npm run dev") 它始于localhost:3000(当我运行npm run dev时)

I positioned xampp so that document root of server is at wordpress folder. 我放置了xampp,以便服务器的文档根目录位于wordpress文件夹中。

When i try localhost/wp-admin I get the acess to admin panel but if I try localhost:3000/wp-admin I cannot access it. 当我尝试localhost / wp-admin时,会进入管理面板,但是如果我尝试localhost:3000 / wp-admin,则无法访问它。

Anyone has idea how to access it 任何人都知道如何访问它

Try to use npm run build , In that way you can run your application to the root domain. 尝试使用npm run build ,这样您可以将应用程序运行到根域。

Thanks 谢谢

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

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