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
Copy file name to clipboardExpand all lines: examples/simple-website-example/README.md
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,22 @@
2
2
3
3
This is a very simple example of a website that uses the SQLPage web application framework.
4
4
5
-
This website illustrates how to create a very Create-Read-Update-Delete (CRUD) application using SQLPage.
5
+
This website illustrates how to create a basic Create-Read-Update-Delete (CRUD) application using SQLPage.
6
6
It has the following bsic features:
7
7
8
8
- Displays a list of user names using the [list component](https://sql.ophir.dev/documentation.sql?component=list#component) (in [`index.sql`](./index.sql#L14-L20))
9
-
- Add a new user name to the list through a form (in [`index.sql`](./index.sql#L1-L9))
9
+
- Add a new user name to the list through a [form](https://sql.ophir.dev/documentation.sql?component=form#component) (in [`index.sql`](./index.sql#L1-L9))
10
10
- View an user's personal page by clicking on a name in the list (in [`user.sql`](./user.sql))
11
-
- Delete an user from the list by clicking on the delete button in the user's personal page (in [`delete.sql`](./delete.sql))
11
+
- Delete an user from the list by clicking on the delete button in the user's personal page (in [`delete.sql`](./delete.sql))
12
+
13
+
## Running the example
14
+
15
+
To run the example, just launch the sqlpage binary from this directory.
16
+
17
+
## Files
18
+
19
+
-[`index.sql`](./index.sql): The main page of the website. Contains a form to add a new user and a list of all users.
20
+
-[`user.sql`](./user.sql): The user's personal page. Contains a link to delete the user.
21
+
-[`delete.sql`](./delete.sql): The page that deletes the user from the database, and the redirects to the main page.
22
+
-[`sqlpage/migrations/001_create_users_table.sql`](./sqlpage/migrations/001_create_users_table.sql): The SQL migration that creates the users table in the database.
23
+
-[`sqlpage/sqlpage.json`](./sqlpage/sqlpage.json): The [SQLPage configuration](../../configuration.md) file.
0 commit comments