{% extends "Default/default.html" %} {% block content %}
If a user wishes to upload a file from a device onto the board without needing to ssh into the board this is a quick and easy to use alternative.
To upload a file simply press the grey "Browse..." button. This will open up a window on your browser allowing you to locate and add the desired file. One selected the name of the file should be shown beside the "Browse..." button. Then simply press the "Upload" and the file will be uploaded onto the board. The file can be edited or deleted. If the user wishes to edit the file, it will open up the file contents in an editor.
By pressing the "Edit Webapp" button a user will be brought to another page where they can create the front end and/or back end for their own webpage. Because the user can write both front and backend their webpage can be as complicated or simple as desired. Templates for both front and back end are provided as a starting point. In order to add a file to the webapp both a front end and back end must be created with the same name (excluding suffix) and all appropriate changes must be made that are specified in the templates.
The back end is written using the Flask microframework in Python which is based on Werkzeug and Jinja 2. More information of how to use Flask can be found here (internet connection needed to view page). The front end is in HTML which a user can embed JavaScript, CSS, Flask, and more into.
Once both front end and back end is completed you can either edit them by clicking on the name of the file on the "Webapp Reload" page, delete the files, or include them in the new webapp. To add your files to the actual webapp check the "Include" button on the files that you wish to include and press "Reload Webapp". This will return a message of success and then reboot the board. To see your changes you will have to reconnect to the boards AP again. Once you have added your custom webpages and go back to the Custom Content page you will have the ability to press the "View" button which will make a simple GET request with no parameters to your webpage. From your webpage the power is all in the users hands.
For any custom code a user wishes to write can be done by pressing the "Custom Project" button. This will open up the editor in which a user can create their own piece of code and run it. At the moment only Python can be ran but all other forms of code can be written and saved. The user can also change the settings of the editor if they prefer to use different backgrounds, editor types (vim, emacs, etc), or language syntax highlighting.