From bc2fd3607b15893d35f022bbdbbc411ff980d409 Mon Sep 17 00:00:00 2001 From: Arjun Aditya Date: Thu, 28 Nov 2024 20:01:16 +0530 Subject: [PATCH] some deletions --- apps/docs/content/deno/overview.mdx | 54 ++++++++ .../docs/content/deno/tutorial/quickstart.mdx | 59 --------- .../content/deno/tutorial/runtime-sql.mdx | 115 ------------------ .../content/deno/tutorial/step-by-step.mdx | 96 --------------- apps/docs/sidebars.js | 51 ++------ 5 files changed, 66 insertions(+), 309 deletions(-) delete mode 100644 apps/docs/content/deno/tutorial/quickstart.mdx delete mode 100644 apps/docs/content/deno/tutorial/runtime-sql.mdx delete mode 100644 apps/docs/content/deno/tutorial/step-by-step.mdx diff --git a/apps/docs/content/deno/overview.mdx b/apps/docs/content/deno/overview.mdx index bbe59a93..6b2669b8 100644 --- a/apps/docs/content/deno/overview.mdx +++ b/apps/docs/content/deno/overview.mdx @@ -7,9 +7,63 @@ import DocCardList from '@theme/DocCardList'; import Icons from '@theme/Icon'; import LargeCardList from '@site/src/components/LargeCardList'; import LargeCard from '@site/src/components/LargeCard'; +import DeployButton from '@site/src/components/DeployButton'; +import CustomCard from '@site/src/components/CustomCard'; [Deno ↗](https://deno.org/en) is an asynchronous event-driven JavaScript runtime, which is designed to build scalable network applications. +:::tip +Have you got any additional question? Join our **[Discord](https://discord.com/invite/WDvCZ54)** community to get help from our team and other members. +::: + + +As said, there is no need for coding yet, we have created a [Github repository ↗](https://github.com/zeropsio/recipe-deno), a **_recipe_**, containing the most simple Deno web application. The repo will be used as a source from which the app will be built. + + + This is the most bare-bones example of Deno app running on Zerops — as few libraries as possible, + just a simple endpoint with connnect, read and write to a Zerops PostgreSQL database. + + + + +1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) + + +2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-deno/blob/main/zerops-project-import.yml)): + +```yml +project: + name: recipe-deno + tags: + - zerops-recipe + +services: + - hostname: api + type: deno@1 + buildFromGit: https://github.com/zeropsio/recipe-deno + enableSubdomainAccess: true + + - hostname: db + type: postgresql@16 + mode: NON_HA + priority: 1 +``` + +3. Click on **Import project** and wait until all pipelines have finished. + +**That's it, your application is now up and running! :star: Let's check it works:** + +1. A _subdomain_ should have been enabled and visible in the project's **IP addressed & Public Routing Overview** box. Its format should look similar to this `https://api-7f6-8000.prg1.zerops.app`. +2. Click or the `subdomain` URL to open it in a browser and you should see + +``` +{"message":"This is a simple, basic Deno / Oak application running on Zerops.io,\n each request adds an entry to the PostgreSQL database and returns a count.\n See the source repository (https://github.com/zeropsio/recipe-deno) for more information.","newEntry":"274b0cc1-5b6d-4351-b8ec-53cf82bd9d0f","count":1} +``` + +:::tip +Do you have any questions? Check the step-by-step tutorial, browse the documentation and join our **[Discord](https://discord.com/invite/WDvCZ54)** community to get help from our team and other members. +::: + ## How to start It doesn't matter whether it's your first curious introduction to Zerops, you have already mastered the basics and are looking for a tiny detail or inspiration. Below, choose a section that fits your needs: diff --git a/apps/docs/content/deno/tutorial/quickstart.mdx b/apps/docs/content/deno/tutorial/quickstart.mdx deleted file mode 100644 index 6b72b5c3..00000000 --- a/apps/docs/content/deno/tutorial/quickstart.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: No-Fuss speedy trial -description: Get started with Deno & Zerops as fast as possible. ---- - -import DocCardList from '@theme/DocCardList'; -import Icons from '@theme/Icon'; -import LargeCardList from '@site/src/components/LargeCardList'; -import LargeCard from '@site/src/components/LargeCard'; -import DeployButton from '@site/src/components/DeployButton'; -import CustomCard from '@site/src/components/CustomCard'; - - -As said, there is no need for coding yet, we have created a [Github repository ↗](https://github.com/zeropsio/recipe-deno), a **_recipe_**, containing the most simple Deno web application. The repo will be used as a source from which the app will be built. - - - This is the most bare-bones example of Deno app running on Zerops — as few libraries as possible, - just a simple endpoint with connnect, read and write to a Zerops PostgreSQL database. - - - - -1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) - - -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-deno/blob/main/zerops-project-import.yml)): - -```yml -project: - name: recipe-deno - tags: - - zerops-recipe - -services: - - hostname: api - type: deno@20 - enableSubdomainAccess: true - buildFromGit: https://github.com/zeropsio/recipe-deno - - - hostname: db - type: postgresql@16 - mode: NON_HA - priority: 1 -``` - -3. Click on **Import project** and wait until all pipelines have finished. - -**That's it, your application is now up and running! :star: Let's check it works:** - -1. A _subdomain_ should have been enabled and visible in the project's **IP addressed & Public Routing Overview** box. Its format should look similar to this `https://helloworld-24-8080.prg1.zerops.app`. -2. Click or the `subdomain` URL to open it in a browser and you should see - -``` -Hello, World! -``` - -:::tip -Do you have any questions? Check the step-by-step tutorial, browse the documentation and join our **[Discord](https://discord.com/invite/WDvCZ54)** community to get help from our team and other members. -::: diff --git a/apps/docs/content/deno/tutorial/runtime-sql.mdx b/apps/docs/content/deno/tutorial/runtime-sql.mdx deleted file mode 100644 index d02d8238..00000000 --- a/apps/docs/content/deno/tutorial/runtime-sql.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: Deno + PostgreSQL tutorial -description: Learn how you can work with deno & postgres database on Zerops. ---- - -import DocCardList from '@theme/DocCardList'; -import Icons from '@theme/Icon'; -import LargeCardList from '@site/src/components/LargeCardList'; -import LargeCard from '@site/src/components/LargeCard'; - -As said, there is no need for coding yet, we have created a [Github repository ↗](https://github.com/zeropsio/recipe-onboarding-deno), a **_recipe_**, containing a PostgreSQL service with a simple Deno application. The repo will be used as a source from which the app will be built. - -:::tip -Follow the steps below and when everything is working as expected, fork the repo, try making various changes or be bold and connect your own. -::: - -:::note -In the detail of each step, you can find a link with more information about the topic. -::: - -1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) - -
- 2. Create a project. -

- Learn more about projects in - Zerops. See how to{' '} - import{' '} - a whole project into Zerops. -

-
- -
- - 3. In the left menu, click on Import services, copy & paste the - contents of the `import-services.yml` config file from the recipe - repository of your choice. Then click on Import service. - -

- Learn more about{' '} - services in - Zerops and how to{' '} - - import a service - {' '} - to an existing project. -

-

- The yaml file includes a `buildFromGit` directive, which ensures - a one-time build from Git repository source. See how to connect a{' '} - Github or{' '} - Gitlab repository to be able to - trigger automatic builds & deploys. -

-
- -
- 4. Several pipelines are created, one for project creation and the rest for the activation of the services. Wait for all to finish. -

- Learn more about how the pipelines can be triggered and about build and deploy processes of a Deno application in Zerops. - -Learn more about how to access build log of your Deno service in Zerops. - -

-
- -
- - 5. In the service detail, open the Public access & internal ports{' '} - section, and Enable Zerops Subdomain. - -

- Learn more about how to access your - Deno service in Zerops. -

-
- -
- 6. Once the pipeline has finished, click on the activated subdomain URL. You should see a simple page with

`Entry added successfully with random data: f47ac10b-58cc-0372-8567-0e02b2c3d479. Total count: 1`
-

- Congratulations! You have created your first application in Zerops, and we hope to see your own projects soon. - -For now, check out other features, such as environment variables, runtime log and scaling. - -

-
- -
- - 7. One of the services is `adminer`, a database management tool. - See how to{' '} - access it. - -

- Learn more about how to{' '} - - use `psql` - {' '} - command-line tool instead or how to{' '} - import and export data{' '} - from your database. -

-
-8. Feel free to make any changes to your project, fork the repo or connect your -own. Also see other - Deno - and - PostgreSQL - recipes on our Github page. - -

 

- -:::tip -Have you got any additional question? Join our **[Discord](https://discord.com/invite/WDvCZ54)** community to get help from our team and other members. -::: diff --git a/apps/docs/content/deno/tutorial/step-by-step.mdx b/apps/docs/content/deno/tutorial/step-by-step.mdx deleted file mode 100644 index 44fd03ce..00000000 --- a/apps/docs/content/deno/tutorial/step-by-step.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Step-by-step tutorial -description: Go through the step by step tutorial for deno on Zerops. ---- - -import DocCardList from '@theme/DocCardList'; -import Icons from '@theme/Icon'; -import LargeCardList from '@site/src/components/LargeCardList'; -import LargeCard from '@site/src/components/LargeCard'; - -As said, there is no need for coding yet, we have created a [Github repository ↗](https://github.com/zeropsio/recipe-deno), a **_recipe_**, containing the most simple Deno web application. The repo will be used as a source from which the app will be built. - -:::tip -Follow the steps below and when everything is working as expected, fork the repo, try making various changes or be bold and connect your own. -::: - -:::note -In the detail of each step, you can find a link with more information about the topic. -::: - -1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) - -
- 2. Create a project. -

- Learn more about projects in - Zerops. See how to{' '} - import{' '} - a whole project into Zerops. -

-
- -
- - 3. In the left menu, click on Import services, copy & paste the - contents of this{' '} - - yaml file - {' '} - and click on Import service. - -

- Learn more about{' '} - services in - Zerops and how to{' '} - - import a service - {' '} - to an existing project. -

-

- The yaml file includes a `buildFromGit` directive, which ensures - a one-time build from Git repository source. See how to connect a{' '} - Github or{' '} - Gitlab repository to be able to - trigger automatic builds & deploys. -

-
- -
- 4. Two pipelines are created, one for project creation and one for the service activation. Wait for both to finish. -

- Learn more about how the pipelines can be triggered and about build and deploy processes of a Deno application in Zerops. - -Learn more about how to access build log of your Deno service in Zerops. - -

-
- -
- - 5. In the service detail, open the Public access & internal ports{' '} - section, and Enable Zerops Subdomain. - -

- Learn more about how to access your - Deno service in Zerops. -

-
- -
- 6. Once the pipeline has finished, click on the activated subdomain URL:

You should see a simple page with `Hello World!` printed.
-

- Congratulations! You have created your first application in Zerops, and we hope to see your own projects soon. - -For now, check out other features, such as environment variables, runtime log and scaling. - -

-
-7. Feel free to make any changes to your project, fork the repo or connect your own. Also see other Deno recipes on our Github page. - -

 

- -:::tip -Have you got any additional question? Join our **[Discord](https://discord.com/invite/WDvCZ54)** community to get help from our team and other members. -::: diff --git a/apps/docs/sidebars.js b/apps/docs/sidebars.js index 7a272907..b19aa052 100644 --- a/apps/docs/sidebars.js +++ b/apps/docs/sidebars.js @@ -2494,45 +2494,18 @@ collapsible: false, sidebar_icon: 'deno', }, }, - { - type: 'category', - label: 'Dive-in', -collapsible: false, - link: { - type: 'doc', - id: 'deno/getting-started', - }, - customProps: { - sidebar_icon: 'rocket-launch', - }, - className: 'homepage-sidebar-item', - items: [ - { - type: 'doc', - id: 'deno/tutorial/quickstart', - label: 'Quickstart', - customProps: { - exclude_from_doc_list: false, - }, - }, - { - type: 'doc', - id: 'deno/tutorial/step-by-step', - label: 'Step-by-step tutorial', - customProps: { - exclude_from_doc_list: false, - }, - }, - { - type: 'doc', - id: 'deno/tutorial/runtime-sql', - label: 'Runtime + SQL', - customProps: { - exclude_from_doc_list: false, - }, - }, - ], - }, + // { + // type: 'doc', + // label: 'Dive-in', + // collapsible: false, + // link: { + // type: 'doc', + // id: 'deno/getting-started', + // }, + // customProps: { + // sidebar_icon: 'rocket-launch', + // }, + // }, { type: 'category', label: 'How-to',