Sometimes we might need to communicate directly over HTTP instead of JSONRPC. In this example, the helloWorldOverHttp
implemented in HelloWorldHttpExample
class will be triggered by an HTTP request.
Clone the repository:
git clone https://github.com/Genez-io/genezio-examples
Navigate to the following directory:
cd ./genezio-examples/javascript/webhook
Install dependencies in both client and server:
(cd server && npm install) && (cd client && npm install)
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
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/webhooks
directory.
genezio deploy
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install -g genezio |
Installs genezio globally |
genezio login |
Logs in to genezio |
genezio local |
Starts a local server |
genezio deploy |
Deploys a production project |
genezio --help |
Get help using genezio |
Check out:
If you need support or you have any questions, please join us in our Discord channel. We'd love to chat!