diff --git a/ide/node/settings.json b/ide/node/settings.json index ad22f87f..81e2d6c3 100644 --- a/ide/node/settings.json +++ b/ide/node/settings.json @@ -9,6 +9,23 @@ "terminal.integrated.fontWeight": "normal", "terminal.integrated.hideOnStartup": "never", "workbench.startupEditor": "terminal", + "remote.localPortHost": "localhost", + "remote.autoForwardPorts": true, + "remote.autoForwardPortsSource": "process", + "remote.portsAttributes": { + "5000": { + "label": "Backend Server", + "onAutoForward": "openBrowserOnce" + }, + "3000": { + "label": "Frontend Server", + "onAutoForward": "openBrowserOnce" + }, + "8000": { + "label": "Dev Server", + "onAutoForward": "openBrowserOnce" + } + }, "workbench.colorCustomizations": { "sideBar.background": "#131315", "sideBarSectionHeader.background": "#131315", diff --git a/ide/python/settings.json b/ide/python/settings.json index ad22f87f..81e2d6c3 100644 --- a/ide/python/settings.json +++ b/ide/python/settings.json @@ -9,6 +9,23 @@ "terminal.integrated.fontWeight": "normal", "terminal.integrated.hideOnStartup": "never", "workbench.startupEditor": "terminal", + "remote.localPortHost": "localhost", + "remote.autoForwardPorts": true, + "remote.autoForwardPortsSource": "process", + "remote.portsAttributes": { + "5000": { + "label": "Backend Server", + "onAutoForward": "openBrowserOnce" + }, + "3000": { + "label": "Frontend Server", + "onAutoForward": "openBrowserOnce" + }, + "8000": { + "label": "Dev Server", + "onAutoForward": "openBrowserOnce" + } + }, "workbench.colorCustomizations": { "sideBar.background": "#131315", "sideBarSectionHeader.background": "#131315", diff --git a/workspace-service/templates/flask/app.py b/workspace-service/templates/flask/app.py index e374bb0f..20cf5814 100644 --- a/workspace-service/templates/flask/app.py +++ b/workspace-service/templates/flask/app.py @@ -1,6 +1,6 @@ # This should be the only entry point of the application import os -from flask import Flask +from flask import Flask, render_template from logging.config import dictConfig from models import db from flask_migrate import Migrate @@ -35,6 +35,10 @@ # Add Code Here +@app.route('/') +def home(): + """Default home route.""" + return render_template('index.html') # Run the application diff --git a/workspace-service/templates/flask/templates/index.html b/workspace-service/templates/flask/templates/index.html index e69de29b..45707adb 100644 --- a/workspace-service/templates/flask/templates/index.html +++ b/workspace-service/templates/flask/templates/index.html @@ -0,0 +1,59 @@ + + +
+ + +Your Flask application is running successfully. Start building your backend by adding routes and logic to app.py.
+