Import Projects without Internet Connection
Background
TQLEngine UI supports importing of projects whose contents (as .zip) are provided as HTTP downloadable file. In some cases the controllers on which TQLEngine is installed my not have proper / stable internet connection. Therefore importing of projects may be come problematic. Here are the steps on how to import projects where there is no internet connection.
- Download and install TQLEngine using normal procedure outlined here.
- Cd to TQLEngine installation folder
- Create directories:
- mkdir -p resources/fileserver/deploy
- mkdir localrepo
Create a file named "GenericStaticFile.mqp.xml" in resources/fileserver/deploy folder with content:
Serve Files Locally<NewPackage> <RESTHeaders> <Headers> <Connection>close</Connection> <Access-Control-Allow-Origin>*</Access-Control-Allow-Origin> <Access-Control-Allow-Methods>GET, POST, PUT </Access-Control-Allow-Methods> <Access-Control-Allow-Headers>Content-Type, X-Atomiton-Studio-Key,X-Atomiton-Session-Key </Access-Control-Allow-Headers> </Headers> </RESTHeaders> <NewFacetInstance fid='localfiles' name='File' Type='SffHttpStaticFileFacet'> <OnActivate> <Process BasePath='.' Resource='localrepo' TailPath='index.html'> <Include>RESTHeaders</Include> </Process> </OnActivate> </NewFacetInstance> </NewPackage>
Add this entry to sff.local.config.xml file
Sff Local Config file<sff.local.deploy>resources/fileserver/deploy</sff.local.deploy>
- Restart the engine.
You can serve any file in localrepo folder using the endpoint
Files EndPointhttp://<HostORIPofTQLEngine>:<PortOfTQLEngine>/fid-localfiles/localrepo/<NameOfFileYouWantTOView>
- If you export the project from TQLStudio or get project zip files from elsewhere you can always copy the zip files to localrepo folder on the controller machine using (scp or other commands)
- Now you can import the project using endpoint in step 7.