You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

port

The port keyword returns the port number to which the request was sent.

It is the value of the part after “:” in the Host header value, if any, or the server port where the client connection was accepted on.

Search results for "port"

port

The port keyword returns the port number to which the request was sent.

It is the value of the part after “:” in the Host header value, if any, or the server port where the client connection was accepted on.

import_gpx()

Imports a GPX string and returns a complex object with its contents.

add(gpxString)

Deployment Format

folder / filedescription
componentsContains the shared components of the pages editor of Structr.
filesContains all files out of Sturctr’s virtual filesystem. Folders and files in the virtual filesystem are not being exported by default. If you want to include a folder or file into the export you have to set the flag includeInFrontendExport on each file or folder. Each file or folder will inherit this flag from its parent folder.
mail-templatesContains the mail-templates.
modulesContains the application configuration and definition of additional modules of Structr e.g. the flow engine.
pagesContains the created pages in the pages editor of Structr.
schemaContains the schema definition and code entered in the schema and code section of the Structr UI.
securityContains the resource access grants defined in the security section of the Structr UI.
templatesContains all template elements of the pages editor of Structr.
application-configuration-data.jsonContains the configured schema layouts of Structr’s schema editor.
components.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the components folder of the export.
deploy.confContains information about the Structr system that created the export of the application.
files.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the files folder of the export.
localizations.jsonContains the localizations that where created in the localizations section of the Structr UI and that can be used in server side scripting with the localize() function of Structr.
mail-templates.jsonContains the settings e.g. visiblity flags, locale or uuid for each file in the mail-templates folder of the export.
pages.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the pages folder of the export.
pre-deploy.confScript that is run before deployment import. Use this to create users who are granted access to nodes in the export files.
post-deploy.confScript that is run after deployment import. Can be used to start any tasks which are necessary after import.
sites.jsonContains sites that are configured in the pages section of the Structr UI.
templates.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the templates folder of the export.
widget.jsonContains the widgets that were created in the pages section of the Structr UI.

Interfaces

application.host The listen address of the Structr HTTP server. If you set the listen address to 127.0.0.1, Structr will only be accessible for applications that run on the local host. This value essentially binds the HTTP server to the local loopback interface. The other option is 0.0.0.0 which makes Structr accessible from all networks.
application.http.port The HTTP port that Structr listens on. If you want to be able to access Structr under a simple http:// URL, you need to set this value to 80.
application.https.port The HTTPS port that Structr listens on. If you want to be able to access Structr under a simple https:// URL, you need to set this value to 443.
application.ssh.port The port that the SSHService listens on.
application.ftp.port The port that the FTPService listens on.
application.https.enabled If enabled, the internal HTTP server will be configured to allow HTTPS connections to the application.https.port.
application.keystore.path The path to a JKS keystore file that contains the certificate chain and private key for the SSL configuration needed for HTTPS. The keystore must be in PCK12 format.
application.keystore.password The password for the JKS keystore used in application.keystore.path.
application.baseurl.override Overrides baseUrl value that is originally assembled dynamically from the protocol, hostname and port of the server instance Structr is running on.

AdminShell

Mode set to 'AdminShell'. Type 'help' to get a list of commands.
admin@Structr> help
export - Exports the Structr application to a directory.
export-data - Exports data from the Structr application to a directory.
file-import - Imports files directly from a directory on the server.
help - Prints a list of all commands and a short help text. Use 'help <command> to get more details.
import - Imports a Structr application from a directory.
import-data - Imports data into a Structr application from a directory.
init - Initializes UUIDs, labels and indexes on nodes and relationships.
user - Creates and deletes users, sets passwords.
admin@Structr>

Data Deployment Format

A typical Structr data deployment export has the following export content:

file/folderdescription
nodesContains all export files for configured node types
relationshipsContains all export files for relationships from/to configured node types
pre-data-deploy.confScript that is run before data deployment import. Use this to create users who are granted access to nodes in the export files.
post-data-deploy.confScript that is run after data deployment import. Can be used to start any tasks which are necessary after import.

Maintenance

maintenance.application.http.port HTTP port the Structr server will listen on in maintenance mode.
maintenance.application.https.port HTTPS port the Structr server will listen on in maintenance mode.
maintenance.application.ssh.port SSH port the Structr server will listen on in maintenance mode.
maintenance.application.ftp.port FTP port the Structr server will listen on in maintenance mode.
maintenance.resource.path The local folder for static resources served in maintenance mode. If no path is provided, a default maintenance page with customizable text is shown in maintenance mode.
maintenance.message Text for default maintenance page.

Scripting Errors

2020-03-31 22:01:31.141 [pool-1-thread-902] WARN  org.structr.core.script.Scripting - Exception in Scripting context
org.mozilla.javascript.EvaluatorException: syntax error (Template.script source ["Search Results Main Content":6c9c352dbf264a6a95924e9dd597b6b5]#53)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:79)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:66)
at org.mozilla.javascript.Parser.addError(Parser.java:259)
at org.mozilla.javascript.Parser.reportError(Parser.java:327)
at org.mozilla.javascript.Parser.reportError(Parser.java:314)
at org.mozilla.javascript.Parser.reportError(Parser.java:307)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:3198)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:2740)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2634)
[...]

Import Bootstrap Page Template

Here, we do the latter and hit the “Start Import” button. Notification messages in the top right corner indicate when the page is successfully parsed and imported. You can close the Import Template dialog at any time, the import process continues in the background. When the import is finished, click on the new page element in the page tree and select Preview to display the imported page.

Deployment

Another way to import and export the application and data is via a zip file import and export. This is the point where an exported and archived Structr application can be imported from a remote source. This can be used for example applications provided by vendors or when no version-control tool like git or subversion is used in the built process of the application.

deploy

Name Value
mode deployment mode (import/export)
source source directory when importing
target target directory when exporting
extendExistingApp incremental import (true/false)

deployData

Name Value
mode deployment mode (import/export)
source source directory when importing
target target directory when exporting
types comma-separated list of data types to export

sync

Name Value
mode operation mode (import/export)
file data file when importing or exporting (e.g. my-data.zip)
query Cypher query that returns the desired export subgraph

Import Wizard

The CSV Import Wizard allows you to import large and complex CSV files by mapping fields from the input document to properties of one or more schema types. You can also use a transformation function to modify values before the importing. The wizard recognizes fields with similar or identical names in the data to be imported and automatically selectes the corresponding target field in the data model.

Simple Import Dialog

The simple CSV import dialog in the Data section is a tool to quickly import a limited dataset, based on very simple rules. The import is limited to a single type, the input can have a maximum size of 100,000 characters, and the columns in the CSV file must exactly match the property names of the target type. If you need more options, you can use the CSV Import Wizard in the Files section.

Start Import

When you are finished configuring the import mapping, you can click the “Start Import Button” to start the import. Structr will show status update notifications for the import progress in the upper right corner.

Deployment Import

If you want to import an existing Structr application to a development environment on your local machine or want to deploy a new version on your production systems you can use the import functionality of Structr. You can follow the import progress in the server log or with the notifications in the Structr UI.

To trigger the import there are multiple options.

If you want to import an Structr application from a remote system you can put the source code of the exported application into a ZIP file on a remote location. Enter that location into the field Import application from URL in the ‘Dashboard’ section of the Structr UI under the tab Deployment and click on the button to start the download and import process.

Data Deployment Export

Go to the ‘Dashboard’ section of the Structr UI into the tab Deployment. Enter the export location as an absolute path of the local file system into the input field ‘Export data to local directory’, select the desired export types and click on the Export button.

Data Deployment Import

By default, the import runs without any checks. Cardinality is not enforced, validation rules are not applied and onCreate/onSave methods are not run. This is due to the fact that the nodes and relationships are imported sequentially and if those things were enabled, errors would probably stop the import. To update the indexes after an import, simply use the admin-tool “Rebuild all Indexes” in the schema.