From 56326fa227c73c82561089a9e07ab491bfc6512f Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:13:32 +0200 Subject: [PATCH 01/10] Update expressjs.md --- docs/frameworks/expressjs.md | 41 +++++++++--------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/docs/frameworks/expressjs.md b/docs/frameworks/expressjs.md index f58d7a58..5f65277c 100644 --- a/docs/frameworks/expressjs.md +++ b/docs/frameworks/expressjs.md @@ -1,9 +1,8 @@ --- -description: Learn how to deploy a Express.js application with Genezio. +description: Learn how to deploy an Express.js application with Genezio. --- import Tabs from '@theme/Tabs'; - import TabItem from '@theme/TabItem'; # Express.js @@ -20,39 +19,14 @@ Get started in no time with the [Express.js template](https://app.genez.io/expre # Deployment -In this tutorial, you will learn how to deploy an existing Express.js app using Genezio, a serverless deployment platform that simplifies app management and reduces costs. We'll cover the benefits, answer common questions, and provide detailed deployment steps. - -**Do I Need to Modify My Express App Code?** Just make sure that your code is written in a stateless manner. [Read more](https://stackoverflow.com/questions/5329618/stateless-vs-stateful) - -## Why Use Genezio? - -### Benefits of Using Genezio - -1. **Faster Deployment**: Genezio optimizes the deployment process, significantly reducing the time it takes to get your app live. -2. **Lower Costs**: Pay only for the resources you use, thanks to Genezio’s efficient infrastructure and scalable solutions. -3. **Reliable and Scalable**: No longer worry about PM2 and Docker. You write the code, and Genezio seamlessly scales it across multiple cores. -4. **Enhanced Security**: Built-in security features and automatic updates protect your app against the latest threats without additional effort. -5. **Reduced Management Overhead**: Focus on developing your app instead of managing servers and routine maintenance tasks. -6. **Easy Migration**: Obtain all these advantages with minimal code changes. - -### How Does Genezio Handle High Traffic? +Learn how to deploy an existing Express.js app using Genezio, a serverless deployment platform that simplifies app management and reduces costs -Genezio, being a Function as a Service (FaaS) platform, automatically scales your application based on traffic demands. It works by executing functions in response to events and can handle a large number of requests concurrently. This ensures your app remains responsive and performs well during traffic spikes. - - - -### Do I Need to Modify My Express App Code? - -Migrating your Express app to Genezio typically requires minimal changes. Our migration guide provides detailed instructions for necessary compatibility adjustments. ## Prerequisites ### 1. Install genezio -Use your preferred package manager to install genezio: +Use your preferred package manager to install Genezio: @@ -357,7 +331,7 @@ After that, you can deploy your project without the `--env` flag. ::: For more information about environment variables, you can check the [official documentation](/docs/project-structure/backend-environment-variables.md). -## Test your app +## See your app in Genezio Dashboard After deploying your application, you can test it to ensure it's running correctly. To verify that your Express.js app is working, open a web browser and navigate to the URL provided for your deployed function. @@ -367,7 +341,12 @@ Additionally, you can monitor and manage your app through the [Genezio App Dashb You can find this URL in the deployment output under the `App Dashboard URL` section. -### Support +## Frequently Asked Questions +### Do I Need to Modify My Express App Code? + +Your express code will not require any adjustments as long as it is written in a **stateless** manner. [Read more](https://stackoverflow.com/questions/5329618/stateless-vs-stateful) + +## Support We invite you to join our community on [Discord](https://discord.gg/uc9H5YKjXv) for further information and help. From d0b76cbd7ed53d0a07bc93ca45fd1a7bebd1b4f1 Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:57:54 +0200 Subject: [PATCH 02/10] Update nextjs.md --- docs/frameworks/nextjs.md | 51 +++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/docs/frameworks/nextjs.md b/docs/frameworks/nextjs.md index 746da2a0..35a252c9 100644 --- a/docs/frameworks/nextjs.md +++ b/docs/frameworks/nextjs.md @@ -2,6 +2,8 @@ description: Learn how to deploy a Next.js application with Genezio. --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; # Next.js @@ -16,9 +18,46 @@ Next.js is a React framework that allows you to build static and server-rendered Get started in no time with the [Next.js template](https://app.genez.io/nextjs-getting-started). ::: -## Deployment - -To deploy a Next.js application with Genezio, all you need to do is to run the following command in the root directory of your project: +# Deployment + +Learn how to deploy an existing Next.js app using Genezio, a serverless deployment platform that simplifies app management and reduces costs + +### 1. Install genezio + +Use your preferred package manager to install Genezio: + + + +
+ ``` + npm install genezio -g + ``` +
+
+ +
+ ``` + pnpm add -g genezio + ``` +
+
+ +
+ ``` + yarn add global genezio + ``` +
+
+
+ +### 2. Deploy your project + +:::info +If you don't already have a Next.js app, you can create one by running in your terminal: +``` +npx create-next-app@latest +``` +::: ```bash genezio deploy @@ -36,8 +75,10 @@ region: us-east-1 # Specifies the version of the YAML configuration syntax being used. yamlVersion: 2 ``` +### 3. Monitor your project +You can monitor and manage your application through the [Genezio App Dashboard](https://app.genez.io/dashboard). The dashboard URL, also provided after deployment, allows you to access comprehensive views of your project's status and logs. -## Frequently Asked Questions +# Frequently Asked Questions - ### How do I set a custom subdomain for my Next.js application? @@ -69,7 +110,7 @@ yamlVersion: 2 No, you don't need a Dockerfile to deploy a Next.js application with Genezio. Genezio builds your application using a serverless architecture, which means that you don't need to worry about Docker, Dockerfiles or scaling. -## Known Limitations +# Known Limitations ### Incremental Static Regeneration (ISR) From af46e0c2ceebcd62a1daeda3ab2a39ad2fb9fe5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreia=20Oc=C4=83noaia?= Date: Wed, 31 Jul 2024 10:07:14 +0300 Subject: [PATCH 03/10] Set the Frameworks section to be collapsed by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreia Ocănoaia --- sidebars.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sidebars.js b/sidebars.js index 79a5b6f6..99269200 100644 --- a/sidebars.js +++ b/sidebars.js @@ -27,7 +27,8 @@ const sidebars = { items: [ "frameworks/nextjs", "frameworks/expressjs", - ] + ], + collapsed: false }, { type: "category", From 713a0ec6680701b1ecc3218366e59e2a56645e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreia=20Oc=C4=83noaia?= Date: Wed, 31 Jul 2024 15:05:07 +0300 Subject: [PATCH 04/10] Add Supported Languages and Frameworks page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreia Ocănoaia --- docs/learn-more/supported-languages.md | 55 ++++++++++++++++++++++++++ sidebars.js | 1 + 2 files changed, 56 insertions(+) create mode 100644 docs/learn-more/supported-languages.md diff --git a/docs/learn-more/supported-languages.md b/docs/learn-more/supported-languages.md new file mode 100644 index 00000000..da1d52e5 --- /dev/null +++ b/docs/learn-more/supported-languages.md @@ -0,0 +1,55 @@ +--- +description: Learn about the supported languages and frameworks that you can deploy with Genezio. +--- + +# Supported Languages and Frameworks + + + Supported Languages and Frameworks | Genezio Documentation + + +Ready to deploy your project on Genezio? We've got you covered! Whether it's a simple frontend or a complex backend system, Genezio makes the process smooth and straightforward. Here’s a rundown of the types of projects you can easily deploy with us. + +## Genezio Typesafe Projects + +We offer full support for typesafe projects, ensuring that your code is robust and maintainable. You can develop your application written in TypeScript or Go. + +For more details on setting up typesafe projects, refer to our [getting started here](https://genezio.com/docs/getting-started/). + +## Serverless Functions + +Genezio supports serverless architecture, allowing you to deploy functions that automatically scale based on demand. You can deploy: + +- AWS Lambda Compatible Functions: Easily deploy any Javascript function on Genezio. This setup allows you to focus on writing code without worrying about infrastructure management. + +To get started, check out [our guide on deploying serverless functions](https://genezio.com/docs/tutorials/how-to-deploy-a-serverless-function/). + +## Express.js Applications + +If you're using Express, you can deploy your applications using Genezio by integrating with serverless HTTP. This setup lets you maintain your familiar Express setup while benefiting from serverless scalability. + +For a step-by-step guide, see our [Express deployment tutorial](https://genezio.com/docs/frameworks/expressjs/). + +## Next.js Applications + +Deploy your Next.js applications on Genezio for a seamless full-stack experience. Genezio provides robust support for Next.js, enabling you to deploy both static and server-rendered content efficiently. + +Learn more about [Next.js deployment on Genezio](https://genezio.com/docs/frameworks/nextjs/). + +## Frontend Frameworks + +Genezio supports a wide range of frontend frameworks, making it easy to deploy your web applications. Supported frameworks include: + +- React: A popular choice for building interactive user interfaces. +- Vue: Known for its flexibility and ease of integration. +- Angular: A powerful framework for building complex single-page applications. +- Vanilla JS/HTML/CSS: For those who prefer to work directly with the core web technologies. + +Explore our [examples here](https://genezio.com/docs/examples/). + +## Conclusion + +Genezio Cloud supports a wide range of technology stacks, providing a flexible and comprehensive deployment solution. Focus on building your application while we take care of deployment and scaling. + +If you need to deploy another type of project, please contact us at contact@genezio.com. + diff --git a/sidebars.js b/sidebars.js index 99269200..71c4f555 100644 --- a/sidebars.js +++ b/sidebars.js @@ -206,6 +206,7 @@ const sidebars = { link: { type: "doc", id: "learn-more/README" }, items: [ "learn-more/upgrading-to-v1", + "learn-more/supported-languages", ] }, "troubleshooting", From b23460e2fbe43d333f9aa6743e305f58b105c848 Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:07:38 +0200 Subject: [PATCH 05/10] Update expressjs.md --- docs/frameworks/expressjs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/frameworks/expressjs.md b/docs/frameworks/expressjs.md index 5f65277c..02be16ac 100644 --- a/docs/frameworks/expressjs.md +++ b/docs/frameworks/expressjs.md @@ -344,7 +344,7 @@ You can find this URL in the deployment output under the `App Dashboard URL` sec ## Frequently Asked Questions ### Do I Need to Modify My Express App Code? -Your express code will not require any adjustments as long as it is written in a **stateless** manner. [Read more](https://stackoverflow.com/questions/5329618/stateless-vs-stateful) +Your express code will only require the above [adjustments](#deployment-guide), as long as it is written in a **stateless** manner. [Read more](https://stackoverflow.com/questions/5329618/stateless-vs-stateful) ## Support From 22dbd791604d0e0dcf5e4faa33e2ee2f04f284d7 Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:39:46 +0200 Subject: [PATCH 06/10] Used genezio to create nextjs w/o wizzard --- docs/frameworks/nextjs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/frameworks/nextjs.md b/docs/frameworks/nextjs.md index 35a252c9..7cb4191f 100644 --- a/docs/frameworks/nextjs.md +++ b/docs/frameworks/nextjs.md @@ -55,7 +55,7 @@ Use your preferred package manager to install Genezio: :::info If you don't already have a Next.js app, you can create one by running in your terminal: ``` -npx create-next-app@latest +genezio create nextjs --name myapp --region eu-central-1 --default ``` ::: From 81be7e1d8bfc389f147436619ea4153ab2d4d969 Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:26:36 +0200 Subject: [PATCH 07/10] Update genezio-create.md --- docs/cli-tool/cli-commands/genezio-create.md | 56 +++++++++++++------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/docs/cli-tool/cli-commands/genezio-create.md b/docs/cli-tool/cli-commands/genezio-create.md index dfc3796a..cffd5d8b 100644 --- a/docs/cli-tool/cli-commands/genezio-create.md +++ b/docs/cli-tool/cli-commands/genezio-create.md @@ -10,18 +10,34 @@ description: Discover how to create fullstack or backend projects with the genez ### Usage -#### Interactive +### Interactive `genezio create [--path ] [--logLevel ] [-h | --help]` -#### Fullstack +### Fullstack `genezio create fullstack [--name ] [--region ] [--backend ] [--frontend ] [--multirepo] [--path ] [--logLevel ] [-h | --help]` -#### Backend +### Backend `genezio create backend [--name ] [--region ] [--backend ] [--path ] [--logLevel ] [-h | --help]` +### Nextjs starter project + +`genezio create nextjs [--name ] [--region ] [--default][-h | --help]` + +### Expressjs starter project + +`genezio create expressjs [--name ] [--region ][-h | --help]` + +### Nitrojs starter project + +`genezio create nitrojs [--name ] [--region ][-h | --help]` + +### Serverless function + +`genezio create serverless [--name ] [--region ][-h | --help]` + ### Description Bootstrap a new project with starter code for different supported languages/frameworks. @@ -39,7 +55,14 @@ These options work with any `genezio create` subcommand ::: +`--name `: Name of the project +- Required, asked interactively if not provided +`--region `: Region of the project +- Required, asked interactively if not provided + +- Choices: `us-east-1`, `eu-central-1` + `--path `: The path where the new project will be created - Default: `current-directory + project-name` @@ -61,15 +84,6 @@ These options work only when combined with `genezio create frontend` subcommand. -`--name `: Name of the project - -- Required, asked interactively if not provided - -`--region `: Region of the project - -- Required, asked interactively if not provided -- Choices: `us-east-1`, `eu-central-1` - `--backend `: Starter template for backend - Required, asked interactively if not provided @@ -95,15 +109,19 @@ These options work only when combined with `genezio create backend` subcommand. -`--name `: Name of the project +`--backend `: Starter template for backend -- Required, asked interactively if not provided +- Choices: `ts`, `js` -`--region `: Region of the project +### Nextjs Subcommand Options -- Required, asked interactively if not provided -- Choices: `us-east-1`, `eu-central-1` + -`--backend `: Starter template for backend +:::info +These options work only when combined with `genezio create nextjs` subcommand. +::: + + + +`--default`: Auto-selects all the default options for creating the Next.js starter project. -- Choices: `ts`, `js` From f5c97160bb2d23ff74067d7cdf0a7aaf4a702bcd Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:18:21 +0200 Subject: [PATCH 08/10] Resolve Costin feedback --- docs/cli-tool/cli-commands/genezio-create.md | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/cli-tool/cli-commands/genezio-create.md b/docs/cli-tool/cli-commands/genezio-create.md index cffd5d8b..f91dc22c 100644 --- a/docs/cli-tool/cli-commands/genezio-create.md +++ b/docs/cli-tool/cli-commands/genezio-create.md @@ -10,33 +10,33 @@ description: Discover how to create fullstack or backend projects with the genez ### Usage -### Interactive +#### Interactive `genezio create [--path ] [--logLevel ] [-h | --help]` -### Fullstack +#### Fullstack `genezio create fullstack [--name ] [--region ] [--backend ] [--frontend ] [--multirepo] [--path ] [--logLevel ] [-h | --help]` -### Backend +#### Backend `genezio create backend [--name ] [--region ] [--backend ] [--path ] [--logLevel ] [-h | --help]` -### Nextjs starter project +#### Nextjs starter project -`genezio create nextjs [--name ] [--region ] [--default][-h | --help]` +`genezio create nextjs [--name ] [--region ] [--default] [--path ] [--logLevel ] [-h | --help]` -### Expressjs starter project +#### Expressjs starter project -`genezio create expressjs [--name ] [--region ][-h | --help]` +`genezio create expressjs [--name ] [--region ] [--path ] [--logLevel ] [-h | --help]` -### Nitrojs starter project +#### Nitrojs starter project -`genezio create nitrojs [--name ] [--region ][-h | --help]` +`genezio create nitrojs [--name ] [--region ] [--path ] [--logLevel ] [-h | --help]` -### Serverless function +#### Serverless function -`genezio create serverless [--name ] [--region ][-h | --help]` +`genezio create serverless [--name ] [--region ] [--path ] [--logLevel ] [-h | --help]` ### Description From 2a3fe2bd5774f93deb63246acf3dbd5b4a2d3e27 Mon Sep 17 00:00:00 2001 From: Costin Sin Date: Fri, 2 Aug 2024 17:21:54 +0300 Subject: [PATCH 09/10] Add `.js` to all technologies --- docs/cli-tool/cli-commands/genezio-create.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/cli-tool/cli-commands/genezio-create.md b/docs/cli-tool/cli-commands/genezio-create.md index f91dc22c..63c52b54 100644 --- a/docs/cli-tool/cli-commands/genezio-create.md +++ b/docs/cli-tool/cli-commands/genezio-create.md @@ -22,15 +22,15 @@ description: Discover how to create fullstack or backend projects with the genez `genezio create backend [--name ] [--region ] [--backend ] [--path ] [--logLevel ] [-h | --help]` -#### Nextjs starter project +#### Next.js starter project `genezio create nextjs [--name ] [--region ] [--default] [--path ] [--logLevel ] [-h | --help]` -#### Expressjs starter project +#### Express.js starter project `genezio create expressjs [--name ] [--region ] [--path ] [--logLevel ] [-h | --help]` -#### Nitrojs starter project +#### Nitro.js starter project `genezio create nitrojs [--name ] [--region ] [--path ] [--logLevel ] [-h | --help]` @@ -113,7 +113,7 @@ These options work only when combined with `genezio create backend` subcommand. - Choices: `ts`, `js` -### Nextjs Subcommand Options +### Next.js Subcommand Options From c363db5d5209a76c80df3edc0ce253a83c272c40 Mon Sep 17 00:00:00 2001 From: Tudor Pipernea <69115828+tudorpip@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:42:03 +0200 Subject: [PATCH 10/10] Update docs/frameworks/nextjs.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andreia Ocănoaia --- docs/frameworks/nextjs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/frameworks/nextjs.md b/docs/frameworks/nextjs.md index 7cb4191f..0012bdbc 100644 --- a/docs/frameworks/nextjs.md +++ b/docs/frameworks/nextjs.md @@ -55,7 +55,7 @@ Use your preferred package manager to install Genezio: :::info If you don't already have a Next.js app, you can create one by running in your terminal: ``` -genezio create nextjs --name myapp --region eu-central-1 --default +genezio create nextjs --name nextjs-project --region us-east-1 --default ``` :::