You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Hosted SQLPage: set-up a SQLPage website in three clicks.'as description,
7
+
'documentation'as menu_item,
8
+
'Poppins'as font;
9
+
10
+
SELECT'hero'as component,
11
+
'Hosted SQLPage'as title,
12
+
'Work In Progress: We are working on a cloud version of SQLPage
13
+
that will enable you to effortlessly set up your website online without the need to download any software or configure your own server.'as description,
'Let''s create your first SQLPage website together, step by step, from downloading SQLPage to making your site available online for everyone to browse.'as description,
'Instructions unclear ? Get in touch !'as link_text;
16
+
17
+
18
+
SELECT'text'as component,
19
+
'Download SQLPage'as title;
20
+
SELECT'Download the latest SQLPage'as contents, 'https://github.com/lovasoa/SQLpage/releases'as link;
21
+
SELECT' for your operating system.
22
+
SQLPage is distributed as a single executable file, making it easy to get started.'as contents;
23
+
24
+
SELECT'text'as component, 'Launch your development server'as title;
25
+
SELECT'Create a folder on your computer where you will store your website.
26
+
Then launch the 'as contents;
27
+
SELECT'sqlpage'as contents, TRUE as code;
28
+
SELECT' executable file you just downloaded in a terminal from this folder.'as contents;
29
+
SELECT'text'as component,
30
+
'You should see a message in your terminal that includes the sentence 'as contents;
31
+
SELECT'Starting server on 0.0.0.0:8080'as contents, TRUE as code;
32
+
SELECT'. This means that sqlpage is running successfully. '
33
+
SELECT'text'as component, 'You can open your website locally by visiting 'as contents;
34
+
SELECT'http://localhost:8080'as contents, TRUE as code, 'http://localhost:8080'as link;
35
+
36
+
SELECT'text'as component,
37
+
'Your website''s first SQL file'as title;
38
+
SELECT'In the root folder of your SQLPage website, create a new SQL file called "index.sql".'as contents;
39
+
SELECT'text'as component, 'Open the "index.sql" file in a text editor.'as contents;
40
+
SELECT'text'as component, 'Write your SQL code in the "index.sql" file to retrieve data from your database and define how it should be displayed on your website.'as contents;
41
+
SELECT'text'as component, 'For example, you can start with a simple SQL code that displays a list of popular websites from your "website" table. Here''s an example:'as contents;
42
+
SELECT'text'as component;
43
+
SELECT'SELECT
44
+
''list'' AS component,
45
+
''Popular websites'' AS title;'as contents, TRUE as code;
46
+
SELECT'text'as component;
47
+
SELECT'
48
+
SELECT
49
+
''Hello'' AS title,
50
+
''world'' description,
51
+
''https://wikipedia.org'' AS link;'as contents, TRUE as code;
52
+
53
+
SELECT'text'as component, 'The list of components you can use and their properties is available in 'as contents;
SELECT'The database schema for your SQLPage website is defined using SQL scripts located in the "sqlpage/migrations" subdirectory of your website''s root folder.
60
+
Each script represents a migration that sets up
61
+
or modifies the database structure.
62
+
The scripts are executed in alphabetical order, so you can prefix them with a number to control the order in which they are executed.'as contents;
63
+
SELECT'text'as component, 'For example, you can create a file called "0001_create_website_table.sql" with the following contents:'as contents;
64
+
SELECT'text'as component;
65
+
SELECT'CREATE TABLE users (
66
+
id INTEGER PRIMARY KEY,
67
+
name TEXT NOT NULL
68
+
);'as contents, TRUE as code;
69
+
70
+
SELECT'text'as component, 'Connect to a custom database'as title;
71
+
SELECT'By default, SQLPage uses a SQLite database stored in a file named "sqlpage.db" in your website''s root folder.
72
+
You can change this by creating a file named "sqlpage/config.json" in your website''s root folder with the following contents:'as contents;
SELECT'If you want to make your SQLPage website accessible online for everyone to browse, you can deploy it to a VPS (Virtual Private Server). 'as contents;
83
+
SELECT'To get started, sign up for a VPS provider of your choice. Some popular options include: AWS EC2, DigitalOcean, Linode, Hetzner. 'as contents;
84
+
SELECT'text'as component, 'Once you have signed up with a VPS provider, create a new VPS instance. The steps may vary depending on the provider, but generally, you will need to:'as contents;
85
+
SELECT'text'as component, '1. Choose the appropriate server type and specifications. SQLPage uses very few resources, so you should be fine with the cheaper options.'as contents;
86
+
SELECT'text'as component, '2. Set up SSH access.'as contents;
87
+
SELECT'text'as component;
88
+
SELECT'Once your VPS instance is up and running, you can connect to it using SSH. The provider should provide you with the necessary instructions on how to connect via SSH.'as contents;
89
+
SELECT'text'as component,
90
+
'For example, if you are using a Linux or macOS terminal, you can use the following command:'as contents;
91
+
SELECT'text'as component;
92
+
SELECT'ssh username@your-vps-ip-address'as contents, TRUE as code;
93
+
SELECT'title'as component,
94
+
'Transfer your SQLPage website files to the VPS'as contents, 3as level;
95
+
SELECT'You need to transfer your SQLPage website files from your local computer to the VPS. There are several ways to achieve this, including using SCP (Secure Copy) or SFTP (SSH File Transfer Protocol).'as contents;
96
+
SELECT'text'as component,
97
+
'For example, if you are using SCP, you can run the following command from your local computer, replacing the placeholders with your own information:'as contents;
SELECT'title'as component, 'Run sqlpage on the server'as contents, 3as level;
103
+
SELECT'text'as component, 'Once your SQLPage website files are on the server, you can run sqlpage on the server, just like you did on your local computer.
104
+
Download the sqlpage for linux binary and upload it to your server. 'as contents;
105
+
SELECT'text'as component, 'Then, run the following command on your server:'as contents;
106
+
SELECT'text'as component;
107
+
SELECT'./sqlpage'as contents, TRUE as code;
108
+
SELECT'text'as component,
109
+
'To access your website, enter the adress of your VPS in your adress bar, followed by the port on which sqlpage runs. For instance: http://123.123.123.123:8080.'as contents;
0 commit comments