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.
- Real-time messaging using WebSockets π‘
- Displays online users in each room π₯
- Powered by Deno and the Oak web framework π
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
If you want to run the application locally, follow these steps:
-
Install Deno on your machine π¦.
-
Clone the repository:
git clone https://github.com/ru-dr/socket-deno.git
-
Navigate to the project directory:
cd socket-deno-template
-
Start the development server:
deno run --allow-net --allow-read server.js
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.
To deploy the application on Render:
- Push your code to a GitHub repository ποΈ.
- Connect the repository to your Render account π.
- Configure the environment variable and commands as described above π οΈ.
- Deploy your service π.
To deploy the application on Deno Deploy:
- Push your code to a GitHub repository ποΈ.
- Connect the repository to your Deno Deploy account π.
- Select the framework as None.
- Do not change any other configurations.
- Select the root file as server.js and click deploy π.
- OnRender Version - Check out the live application in action
- Deno Deploy Version - See the app running on Deno Deploy
Feel free to submit issues or pull requests if you find any bugs or have suggestions for improvements.
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy coding with Deno! π¦π