-
After successfully creating a test build site and hosting it on a local server instance, we attempted to host it on our university allocated site, however we ran into a permission issue where the address was not visible externally. A request for clarification on the hosting process was made and will be looked into shortly.
-
Originally we intended to write our back-end in php in order to deliver a product with a recognisable codebase so that other developers could work on it. However in our experimentation we did notice the fact that php would not serve to produce a clean and readable API. This occurred because we changed to creating an API afterwards due to trying to extend the application to exceed our client expectations as we foresaw that given the timescale we could do extra. Now we have changed our cgi scripting language to node.js, and we are using a web application framework called ‘express’ that can easily meet our demands
-
When writing the guide to using our API, we found that we were including the source code of the functions in the API, explaining how they work. This however does not belong in the API, but in comments and documentation, which meant that we had to slightly re-word and re-create sections with the system manual.
-
Integration between our frontend and backend is handled by http POST and GET ajax requests. However when both the frontend and backend are hosted on the same server, this can lead for cross-origin requests. Browsers will normally block these for a good reason since they can lead to security issues. For local testing we have been getting around this by forcibly allowing them, however we can’t do this on a server. We plan on solving this by making use of Apache mod proxies to bind port 3000 to /api/ for all ajax requests.
-
After creating skeleton test examples of both the front end and back end of the login system, and testing that both of these work individually (spinning up a local server to test the html page, and making use of curl to post to the backend nodejs application), I attempting to test their communication. A problem occurred when using a POST method with our backend, and after testing with a different already made backend, I looked at my browser's console and saw that the cross-origin request was being blocked. After doing some research I found that without enabling CORS localhost could not post to localhost:3000, so locally I decided to add code to the backend application to have CORS enabled for testing purposes. However I knew this would not be secure enough for actual deployment so I investigated if Apache offered a way to rebind localhost:3000 to localhost/api, and discovered a method using mod proxies that was able to achieve this.
-
As part of our application, we are using NodeJS to run an instance of our backend application API. So that this backend can be run automatically when the system starts but also so that the process can be stopped when we deploy to the server and restarted after any new dependencies have been added, we needed to run our application as a system service. This was attempted using ‘systemd’, however we ran into issues when trying to implement this. Troubleshooting this was done by recreating the service file that the system uses to create the service and researching the error messages that occurred. Despite this, the issue has not been resolved yet and due to this being a vital part of demonstrating our application, this is a high priority issue until resolution is found.