This is back-end code, separate from "Dating" project.
"Dating" project fork from https://github.com/CHUNG-HAO/Dating
This is the method of create the SSL certificate for testing:
-
Step1: Build the ssl.conf in your project
-
Step2: Run this command to build the server.key and server.crt
openssl req -x509 -new -nodes -sha256 -utf8 -days 3650 -newkey rsa:2048 -keyout server.key -out server.crt -config ssl.conf
- Step3: Run this command to build the server.pfx
openssl pkcs12 -export -in server.crt -inkey server.key -out server.pfx
- Step4: Run this command by system administer in powershell
certutil -addstore -f "ROOT" server.crt
Now you can transfer the URL http to https in your test browser for a few minutes.
details here: https://blog.miniasp.com/post/2019/02/25/Creating-Self-signed-Certificate-using-OpenSSL
You can also see this testing coverage on GitHub actions.
Click here for know more: https://sayanythingapi.sdpmlab.org/api/v1/apidocs/
- https://blog.miniasp.com/post/2019/02/25/Creating-Self-signed-Certificate-using-OpenSSL (openssl: http to https on flask)
- https://hackmd.io/@bessyhuang/Bk2ZnTFwV#%E7%94%A8Flask-Mail%E4%BE%86%E6%94%AF%E6%8F%B4email (flask-mail: Email sending on flask)
- https://www.freecodecamp.org/news/setup-email-verification-in-flask-app/ (email verification tutorial)
- https://github.com/ashutoshkrris/Flask-User-Authentication-With-Email-Verification (email verification tutorial)
- https://itsdangerous.palletsprojects.com/en/2.1.x/ (itsdangerous: Use token on flask)
- https://blog.51cto.com/douya/2151255 (flask-session: Use session on flask)
- https://zhuanlan.zhihu.com/p/544198743 (flask-caching: Use cache on flask)
- https://docs.pytest.org/en/7.1.x/reference/reference.html#command-line-flags (pytest: Unit test on flask)
- https://flask.palletsprojects.com/en/3.0.x/testing/ (pytest: Unit test on flask)
- https://flask-migrate.readthedocs.io/en/latest/ (flask-migrate: Database migration version management)
- https://github.com/flasgger/flasgger (flasgger: API document generation)
- https://flask-admin.readthedocs.io/en/latest/ (flask-admin: Building an admin interface)