Skip to main content

Getting Started

info

The source code for this example is public on the following GitHub repository.

Getting started

This is a simple full stack application that illustrates how genezio works.

Prerequisites

Note: We recommend using nvm to install Node.js and npm.

Project Structure

Inside the project folder, you will find the following files and folders:

├── backend/
│ ├── task.ts
│ ├── helper.ts
│ ├── package.json
│ └── models/
├── frontend/
│ ├── src/
│ ├── public/
│ ├── package.json
├── genezio.yaml
├── README.md
├── .genezioignore
├── .gitignore
└── tsconfig.json

Genezio looks for genezio.yaml to read the settings for deploying the project or for spinning a local dev server for testing.

The backend directory contains the implementation of the server side of the project. task.ts contains the class that we expose to the client via RPC.

The frontend directory contains a React application that talks with the genezio server.

To glue this two component together, an auto-generated SDK is installed in the client/node_modules folder. This can be used by simply importing it into the frontend source code like any other dependency of your project.

Run the project

Clone this example

Clone the repository:

git clone https://github.com/Genez-io/genezio-examples

Navigate to the following directory:

cd ./genezio-examples/javascript/getting-started

Test your project locally

Test the project locally:

genezio local

Open a new terminal, navigate to the following directory, and run npm start to launch the React application:

cd ./client
npm run install-local-sdk
npm start

Deploy your project with genezio

If you wish to deploy your project to the Genezio infrastructure, follow these steps:

Log in to Genezio using the command genezio login:

genezio login

Deploy your project using the genezio deploy command from the ./genezio-examples/javascript/getting-started directory.

genezio deploy

Commands

All commands are run from the root of the project, from a terminal:

CommandAction
npm install -g genezioInstalls genezio globally
genezio loginLogs in to genezio
genezio localStarts a local server
genezio deployDeploys a production project
genezio --helpGet help using genezio

Want to learn more?

Check out:

Contact

If you need support or you have any questions, please join us in our Discord channel. We'd love to chat!

Built With