[英]create react app how to serve it over https?
Could someone point me to a link for total beginners as to how to set up https using create react app? 有人可以将我指向所有初学者的链接,以介绍如何使用create react app设置https吗?
I've ejected the app and need to modify webpack I think. 我弹出了该应用,需要修改我认为的webpack。 But then I don't know where to go from there.
但是后来我不知道从那里去哪里。
I have self-signed certificates generated already. 我已经生成了自签名证书。
Thank you 谢谢
You dont need to modify your webpack or eject the app to use https 您无需修改Webpack或退出应用程序即可使用https
If you want to use Https in development you'll need to set the environment veriable HTTPS=true in your start script in package.json 如果要在开发中使用Https,则需要在package.json的启动脚本中设置环境veriable HTTPS = true
HTTPS=true npm start
HTTPS = true npm开始
If you want to host it on something like amazon S3 you can use cloudfront 如果您想在Amazon S3之类的主机上托管它,可以使用cloudfront
https://medium.com/@omgwtfmarc/deploying-create-react-app-to-s3-or-cloudfront-48dae4ce0af https://medium.com/@omgwtfmarc/deploying-create-react-app-to-s3-or-cloudfront-48dae4ce0af
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.