Making a basic website interact with a program reddit / selfhosted ---------------------------------------------------------------------- Terrible_West5469 · 2023-10-09 18:42 I have a C# .NET console program that takes an audio file as input then outputs lines of text in a console about the file. I want to make this accessible to a group of users. I'm thinking a very simple website with an upload button then the output data is shown in a box or something. I asked ChatGPT for help and it gave me 10 bulletpoints about Web development...it seems overwhelming and not very helpful. I have a web server with the reverse proxy (thanks you all), a domain and console program all working. I'm in over my head and would appreciate any advice. My C# knowledge is limited. I know some html. ---------------------------------------------------------------------- sk1nT7 · 2023-10-09 22:27 You may write some wrapper script in PHP or Python Django/Flask. The wrapper script will provide a simple web interface with an upload button. You would have to validate uploaded files and ensure that it is indeed an audio file only. Validate filename, extension as well as the MIME type. Then store the file on your server in a specific directory, which is not the webroot. Define read permissions only, no execute. Then use system calls to trigger your console app by passing in the audio file's path on your server. Obtain the console output and pass it back to the user. Catch errors and ensure that your console app is secure and does not allow for code injections. The whole concept consists of a frontend, backend and likely a database to store results and maybe provide some authentication. Not sure whether this is a simple exercise for you. Maybe have a look into olivetin: https://noted.lol/olivetin-self-hosted-predefined-shell-commands/ Otherwise, I guess it's likely a programming challenge. ---------------------------------------------------------------------- HomieMorphic · 2023-10-10 03:38 The comment from /u/sk1nT7 describes the typical way of doing this. You write a web app that executes the program and reports the results back to the user. However, if you wrote the program yourself and have a decent grasp of how it works, you could consider writing the web app functionality in C# as well and just adding it to your existing program. [I'd suggest following this tutorial since you'd probably be familiar with most of the steps already](https://learn.microsoft.com/en-us/visualstudio/get- started/csharp/tutorial-aspnet-core?view=vs-2022). ---------------------------------------------------------------------- Terrible_West5469 · 2023-10-10 15:29 Thank you for the guidance! Sounds like I have some learning to do ---------------------------------------------------------------------- BusyEmployer6806 · 2023-10-10 18:57 Hey there, I'm an it student currently working on my masters. If you need some help send me a message, I could use some distraction