Skip to content

Commit

Permalink
Merge pull request #230 from Genez-io/dev
Browse files Browse the repository at this point in the history
Release documentation to dev
  • Loading branch information
andreia-oca authored Aug 5, 2024
2 parents b227827 + d18a97a commit 36c62e4
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 53 deletions.
50 changes: 34 additions & 16 deletions docs/cli-tool/cli-commands/genezio-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ description: Discover how to create fullstack or backend projects with the genez

`genezio create backend [--name <project-name>] [--region <project-region>] [--backend <backend-template>] [--path <project-path>] [--logLevel <log-level>] [-h | --help]`

#### Next.js starter project

`genezio create nextjs [--name <project-name>] [--region <project-region>] [--default] [--path <project-path>] [--logLevel <log-level>] [-h | --help]`

#### Express.js starter project

`genezio create expressjs [--name <project-name>] [--region <project-region>] [--path <project-path>] [--logLevel <log-level>] [-h | --help]`

#### Nitro.js starter project

`genezio create nitrojs [--name <project-name>] [--region <project-region>] [--path <project-path>] [--logLevel <log-level>] [-h | --help]`

#### Serverless function

`genezio create serverless [--name <project-name>] [--region <project-region>] [--path <project-path>] [--logLevel <log-level>] [-h | --help]`

### Description

Bootstrap a new project with starter code for different supported languages/frameworks.
Expand All @@ -39,7 +55,14 @@ These options work with any `genezio create` subcommand
:::

<!-- ::: -->
`--name <project-name>`: Name of the project
- Required, asked interactively if not provided

`--region <project-region>`: Region of the project
- Required, asked interactively if not provided

- Choices: `us-east-1`, `eu-central-1`

`--path <project-path>`: The path where the new project will be created

- Default: `current-directory + project-name`
Expand All @@ -61,15 +84,6 @@ These options work only when combined with `genezio create frontend` subcommand.

<!-- ::: -->

`--name <project-name>`: Name of the project

- Required, asked interactively if not provided

`--region <project-region>`: Region of the project

- Required, asked interactively if not provided
- Choices: `us-east-1`, `eu-central-1`

`--backend <backend-template>`: Starter template for backend

- Required, asked interactively if not provided
Expand All @@ -95,15 +109,19 @@ These options work only when combined with `genezio create backend` subcommand.

<!-- ::: -->

`--name <project-name>`: Name of the project
`--backend <backend-template>`: Starter template for backend

- Required, asked interactively if not provided
- Choices: `ts`, `js`

`--region <project-region>`: Region of the project
### Next.js Subcommand Options

- Required, asked interactively if not provided
- Choices: `us-east-1`, `eu-central-1`
<!-- :::info -->

`--backend <backend-template>`: 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`
41 changes: 10 additions & 31 deletions docs/frameworks/expressjs.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

<!--
### What Kind of Support Does Genezio Offer?
Genezio provides 24/7 support for paid plans to assist with any questions or issues. Our dedicated support team ensures your app runs smoothly on our platform. -->

### 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:

<Tabs>
<TabItem className="tab-item" value="npm" label="npm">
Expand Down Expand Up @@ -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.

Expand All @@ -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 <a href="#support" id="support"></a>
## Frequently Asked Questions
### Do I Need to Modify My Express App Code?

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 <a href="#support" id="support"></a>

We invite you to join our community on [Discord](https://discord.gg/uc9H5YKjXv) for further information and help.

Expand Down
51 changes: 46 additions & 5 deletions docs/frameworks/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

<Tabs>
<TabItem className="tab-item" value="npm" label="npm">
<div id="step1-install-npm">
```
npm install genezio -g
```
</div>
</TabItem>
<TabItem className="tab-item" value="pnpm" label="pnpm">
<div id="step1-install-pnpm">
```
pnpm add -g genezio
```
</div>
</TabItem>
<TabItem className="tab-item" value="yarn" label="yarn">
<div id="step1-install-yarn">
```
yarn add global genezio
```
</div>
</TabItem>
</Tabs>

### 2. Deploy your project

:::info
If you don't already have a Next.js app, you can create one by running in your terminal:
```
genezio create nextjs --name nextjs-project --region us-east-1 --default
```
:::

```bash
genezio deploy
Expand All @@ -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?
Expand Down Expand Up @@ -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)

Expand Down
55 changes: 55 additions & 0 deletions docs/learn-more/supported-languages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
description: Learn about the supported languages and frameworks that you can deploy with Genezio.
---

# Supported Languages and Frameworks

<head>
<title> Supported Languages and Frameworks | Genezio Documentation</title>
</head>

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 [email protected].

4 changes: 3 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const sidebars = {
items: [
"frameworks/nextjs",
"frameworks/expressjs",
]
],
collapsed: false
},
{
type: "category",
Expand Down Expand Up @@ -205,6 +206,7 @@ const sidebars = {
link: { type: "doc", id: "learn-more/README" },
items: [
"learn-more/upgrading-to-v1",
"learn-more/supported-languages",
]
},
"troubleshooting",
Expand Down

0 comments on commit 36c62e4

Please sign in to comment.