B4J Question [ABMaterial] Is it possible to change the generated files and folders structure?

mindful

Active Member
Licensed User
Basically can we do somenthing so after the app is started it can be accessed like this :
http://localhost:51042 and not http://localhost:51042/myapp/

And for the pages in the app:
http://localhost:51042/index.html - first page & application page
http://localhost:51042/anotherpage1.html
http://localhost:51042/anotherpage2.html

I saw that in ABMApplication.AddPage there is the following:
ABM.WritePageToDisk(Page, File.DirApp & "/www/" & AppName & "/" & Page.Name & "/", Page.PageHTMLName, ABMShared.NeedsAuthorization)

Also in ABMApplication.StartServer:
ABM.WriteAppLauchPageToDisk(AppPage, File.DirApp & "/www/" & AppName, "index.html", ABMShared.NeedsAuthorization)


Can I change this and get another output of app files and folder structure ? Or if I change this it will mess things up ?!


BR,
Mihai
 

Joan Paz

Member
Hello,

You can uncomment in ABMApplication:

B4X:
    ' uncomment this if you want to directly access the app in the url without having to add the app name
    ' e.g. 192.168.1.105:51042 or 192.168.1.105 if you are using port 80
    srvr.AddFilter( "/", "ABMRootFilter", False )

Bye.
 
Upvote 0
Top