From 4493050ad38dc3681a6f9b3116789dc48628925e Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:53:08 -0700 Subject: [PATCH 1/9] add infobox to describe 'loco new' options --- docs-site/content/docs/getting-started/tour/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index 2c2678bb..ad725718 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -47,6 +47,10 @@ If you select all defaults, you'll have: * `async` for background workers. Learn about workers configuration [async vs queue](@/docs/processing/workers.md#async-vs-queue) in the _workers_ section. * `Client` asset serving configuration. This means your backend will serve as API. +
+If you'd like to know more about the options the `loco new` command provides, here's a quick rundown. +If not, feel free to skip this side-note and continue on to the next part. +
Now `cd` into your `myapp` and start your app by running `cargo loco start`: From ba59820cda84e85d5a2a5bc8ea8386a9d1c65c35 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:53:59 -0700 Subject: [PATCH 2/9] add section for starter template --- docs-site/content/docs/getting-started/tour/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index ad725718..73ed29b5 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -50,6 +50,11 @@ If you select all defaults, you'll have:
If you'd like to know more about the options the `loco new` command provides, here's a quick rundown. If not, feel free to skip this side-note and continue on to the next part. + +* For the built-in starter templates, the options are: + * `lightweight-service` which is aimed to be minimal and only has controllers and views. Choosing this option will not include the selection options for database, background workers, or asset serving. + * `Rest API` which has the DB connection and user auth, but does not include views (no asset serving option later on). + * `SaaS app` which comes with the DB connection and user auth, as well as views and templating.
Now `cd` into your `myapp` and start your app by running `cargo loco start`: From 7273bed58b04d4b4e0f67f5daff88ccd45582fbb Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:54:37 -0700 Subject: [PATCH 3/9] add database selection choice --- docs-site/content/docs/getting-started/tour/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index 73ed29b5..ef5b8d47 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -55,6 +55,8 @@ If not, feel free to skip this side-note and continue on to the next part. * `lightweight-service` which is aimed to be minimal and only has controllers and views. Choosing this option will not include the selection options for database, background workers, or asset serving. * `Rest API` which has the DB connection and user auth, but does not include views (no asset serving option later on). * `SaaS app` which comes with the DB connection and user auth, as well as views and templating. + +* For DB providers you can choose `Sqlite` or `Postgres`. This option and the following options are not available when you choose the `lightweight-service` template. Now `cd` into your `myapp` and start your app by running `cargo loco start`: From e567a9545508b1579d7c1db17ac455a5287f88e8 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:55:33 -0700 Subject: [PATCH 4/9] state both db options are supported --- docs-site/content/docs/getting-started/tour/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index ef5b8d47..ca102ac1 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -56,7 +56,7 @@ If not, feel free to skip this side-note and continue on to the next part. * `Rest API` which has the DB connection and user auth, but does not include views (no asset serving option later on). * `SaaS app` which comes with the DB connection and user auth, as well as views and templating. -* For DB providers you can choose `Sqlite` or `Postgres`. This option and the following options are not available when you choose the `lightweight-service` template. +* For DB providers you can choose `Sqlite` or `Postgres`, both options are supported in `loco`. This option and the following options are not available when you choose the `lightweight-service` template. Now `cd` into your `myapp` and start your app by running `cargo loco start`: From 73b6fc5e3958334b1e37bdebb4df82281f9f8c96 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:56:12 -0700 Subject: [PATCH 5/9] add section for background workers --- docs-site/content/docs/getting-started/tour/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index ca102ac1..5af23375 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -57,6 +57,11 @@ If not, feel free to skip this side-note and continue on to the next part. * `SaaS app` which comes with the DB connection and user auth, as well as views and templating. * For DB providers you can choose `Sqlite` or `Postgres`, both options are supported in `loco`. This option and the following options are not available when you choose the `lightweight-service` template. + +* For Background worker type, your options are: + * `Async` which spawns workers in-process using the `tokio` async runtime. + * `Queue` which spawns workers using `redis` as a queue. Does not use the same process because it uses `redis`. + * `Blocking` which spawns workers synchronously in the same process, and blocks until they are completed. Use caution when choosing this option as it will block the entire thread. Now `cd` into your `myapp` and start your app by running `cargo loco start`: From 752ce64fc45944ab7d12c04b2bf84451424d36ac Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:56:39 -0700 Subject: [PATCH 6/9] clarify grammar for background worker --- docs-site/content/docs/getting-started/tour/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index 5af23375..091a7d1f 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -58,7 +58,7 @@ If not, feel free to skip this side-note and continue on to the next part. * For DB providers you can choose `Sqlite` or `Postgres`, both options are supported in `loco`. This option and the following options are not available when you choose the `lightweight-service` template. -* For Background worker type, your options are: +* For the background worker type, your options are: * `Async` which spawns workers in-process using the `tokio` async runtime. * `Queue` which spawns workers using `redis` as a queue. Does not use the same process because it uses `redis`. * `Blocking` which spawns workers synchronously in the same process, and blocks until they are completed. Use caution when choosing this option as it will block the entire thread. From d806b5a03767f23271fb09109bf3c421ee86401d Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:57:16 -0700 Subject: [PATCH 7/9] add section to describe serving option and difference --- docs-site/content/docs/getting-started/tour/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index 091a7d1f..d42c6c9a 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -62,6 +62,11 @@ If not, feel free to skip this side-note and continue on to the next part. * `Async` which spawns workers in-process using the `tokio` async runtime. * `Queue` which spawns workers using `redis` as a queue. Does not use the same process because it uses `redis`. * `Blocking` which spawns workers synchronously in the same process, and blocks until they are completed. Use caution when choosing this option as it will block the entire thread. + +* Finally, if you chose the `SaaS app` template above, you have two options to choose from for how your assets will be served. These options set different configuration options, and can be changed after with little effort. The options are: + * `Server` - Which is intended to work when you want to use server-side rendered views. It serves your static assets from the `assets/static/` directory using the `/static` route. + * `Client` - Which is intended to work with the provided `frontend/` client-side rendered app. It serves your static assets from the `frontend/dist/` directory using the `/` route. + * Note that this option only changes the relevant section in the `config/development.yml` file, so not only can you easily change it later (by commenting/uncommenting the relevant blocks), but you can set it up to use both if your needs require it. Now `cd` into your `myapp` and start your app by running `cargo loco start`: From aba870e4d3a08cd470ae3e731f321a5aa92b20e3 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 09:57:57 -0700 Subject: [PATCH 8/9] make final note stand out to readers better --- docs-site/content/docs/getting-started/tour/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index d42c6c9a..b677a26f 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -66,7 +66,7 @@ If not, feel free to skip this side-note and continue on to the next part. * Finally, if you chose the `SaaS app` template above, you have two options to choose from for how your assets will be served. These options set different configuration options, and can be changed after with little effort. The options are: * `Server` - Which is intended to work when you want to use server-side rendered views. It serves your static assets from the `assets/static/` directory using the `/static` route. * `Client` - Which is intended to work with the provided `frontend/` client-side rendered app. It serves your static assets from the `frontend/dist/` directory using the `/` route. - * Note that this option only changes the relevant section in the `config/development.yml` file, so not only can you easily change it later (by commenting/uncommenting the relevant blocks), but you can set it up to use both if your needs require it. + * **Note**: This option only changes the relevant section in the `config/development.yml` file, so not only can you easily change it later (by commenting/uncommenting the relevant blocks), but you can set it up to use both if your needs require it. Now `cd` into your `myapp` and start your app by running `cargo loco start`: From 85351f864bfc9654754b4544cbf48de45f808627 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 1 Oct 2024 12:31:21 -0700 Subject: [PATCH 9/9] add a note about what the views are in Saas --- docs-site/content/docs/getting-started/tour/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-site/content/docs/getting-started/tour/index.md b/docs-site/content/docs/getting-started/tour/index.md index b677a26f..203f3205 100644 --- a/docs-site/content/docs/getting-started/tour/index.md +++ b/docs-site/content/docs/getting-started/tour/index.md @@ -54,7 +54,7 @@ If not, feel free to skip this side-note and continue on to the next part. * For the built-in starter templates, the options are: * `lightweight-service` which is aimed to be minimal and only has controllers and views. Choosing this option will not include the selection options for database, background workers, or asset serving. * `Rest API` which has the DB connection and user auth, but does not include views (no asset serving option later on). - * `SaaS app` which comes with the DB connection and user auth, as well as views and templating. + * `SaaS app` which comes with the DB connection and user auth, as well as views and templating. It uses Tera for server-side rendering in `assets/views/` and React for client-side in `frontend/`. * For DB providers you can choose `Sqlite` or `Postgres`, both options are supported in `loco`. This option and the following options are not available when you choose the `lightweight-service` template.