Python should be installed
Open any newly created folder using vs code or any other IDE. folder name ex: online-code-editor Go to terminal and follow below steps.
- First create virtual environment
python -m venv myenvonline- To activate venv
.\myenvonline\Scripts\activate- Install django
pip install django- To create project
git clone https://github.com/imrosun/online-code-editor-python.git
OR
django-admin startproject onlinecodeSkip if cloned
- To create app inside project
cd onlinecode
python manage.py startapp codeeditorAfter this add app {'codeeditor'} inside INSTALLED_APPS on settings.py file
- To run server
python manage.py runserver- To host on vercel
Step 1: Go to /onlinecode/settings.py Update ALLOWED_HOSTS = ['.vercel.app']
Step 2: Generate requirments.txt using command
pip freeze > requirements.txtStep 3: Create vercel.json file in app folder or manage.py path
