ocr识别 http://192.168.1.198:4708/back
1.前端调用百度ocr识别:
参考网址:https://ai.baidu.com/ai-doc/OCR/ik3h7xv2x
-遇到问题:
-
跨域
-
图片的转码
2.前端部署步骤:
-
下载nginx nginx: download
-
把打包之后文件放在html 文件夹下面
-
配置conf/nginx.conf 文件路径
location /back{ //back是打包后的文件名 root html; index index.html index.htm } //如果前端有设置代理服务器,上传服务器之后不生效怎么办?? location /api{ rewrite ^.+api/?(.*)$ /$1 break; //可选参数,正则验证地址 include uwsgi_params; //可选参数,uwsgi是服务器和服务端应用程序的通信协议,规定了怎么把请求转发给应用程序和返回 proxy_pass http://www.test.com; // 接口地址 }
⚠️注意:
1.进程问题 worker_processes 2;
2.开关nginx 需要有两个文件来控制,不能直接点击exe文件