Hosting HTML files so they are accessible through AGOL

Hosting HTML files so they are accessible through AGOL

I recently made a web mapping application using the ArcGIS for JavaScript API, but I am having a difficult time making it accessible to users of my organizations AGOL account. 
I naïvely thought I could easily host HTML files on my organizations ArcGIS Server through either ArcGIS Server Manager or ArcGIS for Developers, but this was unsuccessful. 
I am currently hosting the files on GitHub and I am capable of setting up a web server with either Python or PHP, but I am confused as to how to eventually make everything available in AGOL. 
I am starting to get the impression that this may not be possible and I should be hosting the HTML files/app on a non Arc web server and just send people the URL for the app instead of having them access the app via AGOL? Any guidance would be helpful here.

Solutions/Answers:

Answer 1:

thank you for the replies. I have been using online GIS applications for less than a year so I am not sure how accurate my understanding of the ESRI online platforms is, but I will try to explain things as best as I can.

One of the things that threw me off at first was the ArcGIS Sever. I assumed this was a web or file server service like AWS that would allow me to host custom apps. It turns out this is not the case and it is more of an internal server for your portal content. This means that in order to share a custom app/map with HTML/JS you first need to set up a file/web server or use a file hosting service. If you set up your own server, you will need to know a software stack like XAMPP or WIMP or at the least Python or Node.js. You can also go with a web service like AWS or if it is a basic project, you can just use GitHub (that is my temporary solution while I work on setting up a server). Once you have hosted your files you can choose the ‘an application’ option in the ‘Add Contents’ tab and simply input the URL. The app/map will be added to your content and accessible to your organization. I hope that helps and its accurate information. Cheers Add Content/ Application Panel

Answer 2:

ArcGIS Server is not quite an internal server for Portal. ArcGIS Server hosts web services that can be consumed by other web apps, e.g. Portal for ArcGIS, Esri JS API apps, etc. It is a software application that is basically a platform for serving web services. Portal is a content management system that came after ArcGIS Server. The above approach is the right way to host the web app, however, securing the app via Portal for ArcGIS or via ArcGIS Online won’t secure the app as the app can still be accessed directly via the URL, i.e. by bypassing Portal/AGO, so this is a good way to do it if you don’t mind the app being public.

References