No description
  • Rust 84.6%
  • JavaScript 15.4%
Find a file
2024-03-16 13:56:40 -04:00
src Initial commit 2024-03-16 13:53:14 -04:00
templates Initial commit 2024-03-16 13:53:14 -04:00
.gitignore Initial commit 2024-03-16 13:53:14 -04:00
Cargo.lock Initial commit 2024-03-16 13:53:14 -04:00
Cargo.toml Initial commit 2024-03-16 13:53:14 -04:00
LICENSE Add MIT License and README.md 2024-03-16 13:56:40 -04:00
README.md Add MIT License and README.md 2024-03-16 13:56:40 -04:00

Page View Counter Real Time

This is a real-time page view counter application built with Rust and Actix. It uses WebSockets to provide real-time updates to all connected clients.

Project Structure

  • src/main.rs: This is the main entry point of the application. It defines the AppState and UserSocket structs, and the WebSocket handling logic.
  • src/static/js/index.js: This is the client-side JavaScript file that handles WebSocket connections.
  • templates/: This directory contains the Tera templates for the web pages.

Dependencies

This project uses the following main dependencies:

  • actix: A powerful, pragmatic, and extremely fast Rust framework for building asynchronous applications.
  • actix-web: A powerful, pragmatic, and extremely fast web framework for Rust.
  • actix-web-actors: A library for working with Actix actors in a web context.
  • tera: A template engine inspired by Jinja2 and the Django template language.

Running the Project

To run the project, use the following command:

cargo run

This will start the server, and you can access the application at http://localhost:8000.

License

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