一、restful 数据(flask,peewee) + VUE前端(JSME)
1、使用flask作为框架
- 原因是rdkit子结构检索使用flask 比较方便,所以reagents检索也用python重写。
- reagent和structure两个数据库都用sqlite
- 数据库ORM使用peewee,主要是function功能其他ORM搞不定
- 结构式检索结构输入(前端)采用jsme,(javascript)
2、前端使用VUE3
- 采用组件化结构
- vite打包发布
二、安装(vps打开5000端口)
1、安装restful(直接安装,不使用conda)
- 安装python
- 安装程序(注意rdkit-pypi是老版本)
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rdkit
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple peewee
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask-cors
- or
- Pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rdkit flask peewee flask-cors
- 3、直接运行python XXX.py
- 4、pm2运行
- 安装nodejs
- npm install pm2 -g
- Pm2 start XXX.py
- 腾讯云5000端口在网站上打开,打开后使用内部网ip才可以外部访问