2024년 2월 13일
(/home/master sudo apt-get -y update sudo apt-get -y upgrade python3 -V sudo apt-get -y install python3-venv python3-pip sudo pip3 --version mkdir projects mkdir venvs python3 -m venv mysite cd mysite cd bin . activate ---------------------- (. activate 하고 가상환경 안에서) pip install wheel pip install django pip install flask pip install markdown --------------------------------------- cd ~/projects mkdir flask cd flask sudo nano index.py from flask import Flask app = Flask(__name__) @app.route('/') def index(): return 'Hello World' export FLASK_APP=index.py flask run --host=0.0.0.0 --> 포트포워딩 5000번 열어주기 ------------------------------------------------------ mkdir django cd django django-admin startproject config . python manage.py runserver