No description
Find a file
2025-02-07 12:42:53 +08:00
db_scripts next.js frontend w/ mongodb local backend 2025-02-07 10:31:32 +08:00
src next.js frontend w/ mongodb local backend 2025-02-07 10:31:32 +08:00
tests next.js frontend w/ mongodb local backend 2025-02-07 10:31:32 +08:00
.gitignore next.js frontend w/ mongodb local backend 2025-02-07 10:31:32 +08:00
DEVELOPMENT.md next.js frontend w/ mongodb local backend 2025-02-07 10:31:32 +08:00
poetry.lock jwt basic 1 2025-02-07 12:42:53 +08:00
poetry.toml next.js frontend w/ mongodb local backend 2025-02-07 10:31:32 +08:00
pyproject.toml jwt basic 1 2025-02-07 12:42:53 +08:00
README.md python flask mongodb test 2025-02-06 16:54:37 +08:00

Tutorial

Flask + MongoDB

https://www.digitalocean.com/community/tutorials/how-to-use-mongodb-in-a-flask-application

MongoDB install

https://www.runoob.com/mongodb/mongodb-window-install.html

MongoDB Shell

https://www.mongodb.com/try/download/shell

Setup

MongoDB (Windows 11)

Install MongoDB.msi Install MongoDB Shell (.zip) copied under the same directory as MongoDB Add the above executables to PATH

MongoDB manually startup

mongod --dbpath C:\Users\tripl\codes\smg\db\

On another shell launch the shell

mongosh
use flask_db
show dbs
db.todos.find()
.quit

Can also use the MongoDB Compass GUI.

Fix

Poetry

for powershell move poetry from "AppData\Roaming\Python\Scripts" to "\AppData\Local\Programs\Python\<PythonVersion>\Scripts"

Poetry shell

Now as a plugin poetry self add poetry-plugin-shell

TODO

  • properly add mongodb authentication and safely connect with secret saved locally