Hi! I wanted to test how the exported files would work on my server (not as a web application, but at least as a static HTML site). To do this I downloaded the zip archive that is in the documentation Hosting & Code Export | WeWeb Documentation
Then I just placed the files in a folder on the server and tried to run Index.html , but got some page, without styles and functionality.
I misunderstand how to place exported files as a ready site (without external DB connection) ? Or have I done something wrong ? How do I check what I’ll end up seeing when my project is ready to be deployed on my own hosting?
I found a similar question in this thread Can you further clarify the self hosting, exporting, and frontend aspects of weweb? , but never understood the answers, why doesn’t the example site launch?
@Joyce ! As an official representative and experienced specialist of this resource, can you tell me how to place files correctly? Can I use the project as a regular static site?
What server / host are you using?
For testing (one-off) I tried deploying the files on free hosting (simplest functionality) https://www.serv00.com/ .
Does the server matter for a static site? It’s a browser-based function, as I understand it. Ideally, the site should “work” (open) even in a local folder on my computer. After all, there are only ordinary HTML/CSS/JS files, they do not need some kind of handler like php or database server.
I apologize for possibly stupid questions, I am new to coding, I may not know a lot of things, so I ask for help from professionals.
If I need some special server to deploy example files from documentation there - can you tell me what you need for that? I will be glad to help!
WeWeb’s exported app is not a static app, it’s a Single Page App, you could try using Firebase, I saw some other member having it working. I think the CSS is not loading because the server is not serving it properly, but one can’t be sure solving these issues “second handedly” not directly on the job.
1 Like
@alcompstudio Just unzip your dowloaded project and put all of the content - including all subdirectories - in your home direcory. Usually public_html or private_html depending on your configuration. I’m actually self-hosting quite complex application with Xano backend, this way, and it is working properly.
Hi @Dominic ! This is exactly what I am doing on the hosting server. But the styles are not working. I’m going to try more deployments to Cloudflare Pages. Perhaps that will help. I’m guessing it has to do with the “relative” paths to the style files in the Index.html file. If the files are placed in some folder other than the site root, it won’t work.
Try checking the configuration of the domain on the server. I’ve create subdomain and pointed to the exact catalogue on the server and it is worknig.
1 Like
I tested on Cloudflare, everything works there except the Tabs page (or rather the Tabs functionality samples don’t work - tabs don’t toggle.) Even the counter works). It’s probably due to the fact that the files need to be hosted… I will test it further. Thank you all for the answers!