A real-time web application built with Phoenix Framework that demonstrates WebSocket functionality.
- Real-time bidirectional communication using WebSockets
- Built with Phoenix LiveView
- Uses Bandit as the web server
- PostgreSQL database integration
Before you begin, ensure you have the following installed:
- Elixir (~> 1.14)
- Phoenix Framework
- PostgreSQL
- Node.js (for asset compilation)
- Clone the repository:
git clone https://github.com/S1D007/Web-Sockets-EX
cd Web-Sockets-EX
- Install dependencies:
mix deps.get
mix deps.compile
- Setup the database:
mix ecto.setup
- Install and build assets:
mix assets.setup
mix assets.build
To start your Phoenix server:
mix phx.server
Now you can visit localhost:4000
from your browser.
- Run tests:
mix test
- Run interactive Elixir shell:
iex -S mix
- Run interactive Phoenix server:
iex -S mix phx.server
The application can be configured through the following files:
config/config.exs
- Main configurationconfig/dev.exs
- Development environmentconfig/test.exs
- Test environmentconfig/runtime.exs
- Runtime configurationconfig/prod.exs
- Production environment
lib/
├── websocket_app/ - Core application logic
└── websocket_app_web/ - Web-related code (controllers, views, templates)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.