前端,使用 React + ant design 构建。因配置跨域请求,所以请求接口地址为:/api/getCarInfo
。
cd web-recognition
yarn install
npm run start // localhost:3000
后端,使用 node.js
调用阿里云接口,地址为:http(s):https://ocrcp.market.alicloudapi.com/rest/160601/ocr/ocr_vehicle_plate.json
。
cd server-recognition
npm install
npm start // localhost:5000
使用 express-generator
生成项目。
"aliyun-api-gateway" // 阿里云 sdk
"body-parser" // 解析 `post` 请求
路径 | 方法 | 参数 |
---|---|---|
/getCarInfo | post | image(base64) |