
#XOJO TUTORIALS INSTALL#
To install Nginx, access the remote server using SSH: > SSH the new session is open, type the following commands to install Nginx: $ sudo apt update Nginx is a light web server which provides more performance when compared with Apache (that is, it is able to serve more requests per second, among other improvements). If the server doesn’t have Nginx already installed, install it now. Once all the files have been copied, make sure to set 750 as the privileges value for the folder and files (choose the option to apply these recursively to all of them). Make sure to copy the folder with the compiled app to the /var/XojoApps path on the server (you’ll need to create that folder/directory first). I’m using the Cyberduck app on macOS but you can choose any method you like. This is the folder you will copy to the server.

Once the app is compiled, you’ll get a Folder/Directory with the following items inside: Next, click on the Build button in Xojo’s IDE toolbar. Then, select X86 64 bit from the Build popup menu in the Inspector Panel. Make sure to choose the Linux checkbox in Build Settings. Note: Adding the port is not required at this time because the port can be assigned when running the app once it is deployed to the server. Next, enter 9000 as the port under the Build Settings section in the Inspector Panel. Setting the Deployment OptionsĬlick on the Shared option found under the Build Settings section in the Navigator. The classic “Hello World” en español, this is everything the web app will do.
#XOJO TUTORIALS CODE#
With the button still selected, add the Pressed Event Handler and type this line of code in the Code Editor: MessageBox "Hola Mundo" Next, drag a button from the Library panel and drop it anywhere on the Layout Editor. Start the Xojo IDE and choose Web from the Project Selector window:Ĭlick on the Web item displayed in the Navigator to access the webpage Layout Editor. This very simple app will display a message when the button is clicked. At the end of this tutorial, you’ll find deployment of more complex web apps can follow the same basic principles. Though this tutorial is focused on the deployment aspects of a web app, we’ll first create a very simple web app in Xojo. As we all know, you don’t usually want to run anything as the root user!

Note: While we are using the “root” user for all the operations to keep the tutorial as short as possible, including files/folders/directories creation/edition and also for launching the web app, you’ll probably want to create a specific user with the proper privileges/group configuration for this.

We will use Ubuntu 20.4 (64-bit) running on a remote server (VPS) in this example, but this tutorial should work on other Linux distros with minimal change, for example CentOS.įirst, in order to deploy a web app you’ll need a way to access the remote server using the Terminal (macOS) or through the Command line, also a way to create and/or modify several files, and to copy files from your local computer to the remote server using (S)FTP. This tutorial provides a step-by-step guide to deploying Xojo web apps on a Linux server.
