AIvoices/server-deno
2025-10-04 17:08:41 -03:00
..
models Remove MacOS' DS_Store files 2025-10-04 17:08:41 -03:00
realtime only register secure when in prod or elato mode 2025-05-25 13:14:08 +01:00
.env.example adding eleven labs 2025-09-19 16:37:11 +07:00
.gitignore update repo and remove factory reset 2025-04-25 16:23:00 +01:00
deno.json adding eleven labs 2025-09-19 16:37:11 +07:00
deno.lock adding eleven labs 2025-09-19 16:37:11 +07:00
Dockerfile v1 2025-04-08 14:05:27 +01:00
logs.log eleven labs support check 2025-09-20 01:51:39 +07:00
main.ts adding eleven labs 2025-09-19 16:37:11 +07:00
README.md updating vercel docs 2025-04-18 16:28:19 +01:00
supabase.ts working 2025-06-11 14:57:14 +01:00
types.d.ts adding eleven labs 2025-09-19 16:37:11 +07:00
utils.ts adding eleven labs 2025-09-19 16:37:11 +07:00

Elato AI WebSocket Server (Deno)

This directory contains the WebSocket server implementation for Elato AI, built with Deno.

Prerequisites

  • Deno installed on your system
  • Network access (for both local development and deployment)

Running the Server

Local Development

  1. Start the server:

    # Navigate to the server-deno directory
    cd server-deno
    
    # Run the server (replace server.ts with your main file if different)
    deno run -A --env-file=.env main.ts
    
  2. Verify the server:

    • The server should be running on port 8000 (default)
    • You should see a message confirming the server is listening

Production Deployment

  1. Deploy to Deno Deploy:

    • Create an account on Deno Deploy
    • Create a new project
    • Connect your GitHub repository or upload your server code
    • Deploy to a custom domain (e.g., your-app.deno.dev)
  2. Update firmware configuration:

    • In the firmware project, make sure DEV_MODE is NOT defined in Config.cpp
    • The WebSocket server will be set to your Deno Deploy URL
  3. Get the Root CA Certificate using terminal:

    • To get the full certificate chain with the root CA:
    openssl s_client -showcerts -connect your-app.deno.dev:443 </dev/null
    
    • Copy the last certificate in the chain (the root CA certificate) including the BEGIN and END lines
    • Paste this into the CA_cert variable in Config.cpp

Troubleshooting

Connection Issues

  • Ensure your ESP32 device and development computer are on the same network
  • Check if any firewalls are blocking port 8000
  • Verify your local IP address hasn't changed (dynamic IPs can change after reconnecting)

Server Errors

  • Check the server logs for error messages
  • Ensure Deno has proper permissions to access network resources

Additional Resources