@elimeleth/vct-layers
Version:
Crea un archivo app.ts, coloca el codigo de abajo alli y luego puedes correrlo con `npx tsx src/app.ts`
62 lines (36 loc) • 1.43 kB
Markdown
Crea un archivo app.ts, coloca el codigo de abajo alli y luego puedes correrlo con `npx tsx src/app.ts`
First, install the necessary packages using `pnpm`:
```bash
pnpm install @elimeleth/vct-flow @elimeleth/vct-baileys
```
Create a new file named `app.ts` in your project directory. Copy and paste the following code into this file:
```typescript
/*
Check the documentation for more details:
https://docs.vaincent.flippoapp.com/es/recipes/workflows/
*/
import "dotenv/config";
import { Workflow, GlobalRouter } from "@elimeleth/vct-flow";
import { BaileysProvider } from "@elimeleth/vct-baileys";
const general = new Workflow("any")
.addAction("Hello world!");
const router = new GlobalRouter({
provider: new BaileysProvider({
name: "bot"
})
});
router.addFlows([general]).listen();
```
You can run your application using the following command:
`npx tsx src/app.ts`
By default, the application runs on port `7777`. You can change this by setting the `PORT` environment variable in your `.env` file:
`PORT=YOUR_PREFERRED_PORT`
For more detailed information and advanced configurations, please refer to the official documentation:
[](https://docs.vaincent.flippoapp.com/es/recipes/workflows/ "Documentation")