socket-deno

This is a simple WebSocket chat application template built with Deno 🦕 and the Oak 🐿️. It provides a starting point for developing real-time chat applications using WebSockets.

MIT License

Stars
1
Committers
2

Socket Deno 🔌🦕

Overview 📚

This is a simple WebSocket chat application template built with Deno 🦕 and the Oak 🐿️. It provides a starting point for developing real-time chat applications using WebSockets.

Previews 🙈

Home Page 🏠

Chat Page 🗣️

Features ✨

  • Real-time messaging using WebSockets 📡
  • Displays online users in each room 👥
  • Powered by Deno and the Oak web framework 🚀

Getting Started 🚀

Setup on Render 🛠️

Deno: The project uses Deno as the runtime. It's automatically installed during the build process.

  • Environment Variable:

    • DENO_INSTALL should be set to /opt/render/project/.deno.
  • Build Command: This command installs Deno on the Render platform:

    curl -fsSL https://deno.land/install.sh | sh
    
  • Start Command: This command sets up the environment and starts the application:

    export PATH="$DENO_INSTALL/bin:$PATH" && deno run --allow-net --allow-read server.js
    

Local Development 💻

If you want to run the application locally, follow these steps:

  1. Install Deno on your machine 🦕.

  2. Clone the repository:

    git clone https://github.com/ru-dr/socket-deno.git
    
  3. Navigate to the project directory:

    cd socket-deno-template
    
  4. Start the development server:

    deno run --allow-net --allow-read server.js
    

Usage 📡

Once the application is running, you can connect to the WebSocket server using a client (e.g., a web browser or a WebSocket client tool). The application supports basic real-time messaging.

Deployment 🚀

To deploy the application on Render:

  1. Push your code to a GitHub repository 🗂️.
  2. Connect the repository to your Render account 🔗.
  3. Configure the environment variable and commands as described above 🛠️.
  4. Deploy your service 🚀.

To deploy the application on Deno Deploy:

  1. Push your code to a GitHub repository 🗂️.
  2. Connect the repository to your Deno Deploy account 🔗.
  3. Select the framework as None.
  4. Do not change any other configurations.
  5. Select the root file as server.js and click deploy 🚀.

Demo 🌐

Contributing 🤝

Feel free to submit issues or pull requests if you find any bugs or have suggestions for improvements.

License 📄

This project is licensed under the MIT License. See the LICENSE file for more details.


Happy coding with Deno! 🦕🔌