Before starting the server, make sure the database reader username, password and database location is set in mongo_cursors.py.
The default homepage for the server is index.html, in the same directory as the server script. The URL of the server needs setting in the javascript of index.html. By default, it is set to var URL = http://localhost:5000. This URL is where the webpage retrieves magnetometer data from.
To start the server, run server.py:
python server.pyNote that the server is set in debug mode. To switch off debug mode, in server.py, change the lines:
if __name__ == "__main__":
app.run(debug=True)to:
if __name__ == "__main__":
app.run(debug=False)