[Release] Redis-Connector: Simplify Redis Integration for FiveM Servers

Hello FiveM Community! :tada:

Iโ€™m thrilled to announce the release of Redis-Connector, a resource designed to streamline integration between your FiveM server and a Redis database.


:star2: Features

  • Effortless Redis Commands: Manage keys, hashes, lists, and more with simple exports or a pre-built library.
  • Performance Monitoring: Built-in metrics to monitor command execution and optimize server performance.
  • Flexible Configuration: Supports local and remote Redis servers, with optional TLS/SSL for secure connections.
  • Developer-Friendly: Modular design makes it perfect for both small scripts and large-scale projects.

:wrench: Getting Started

To start using Redis-Connector, follow these steps:

  1. Install the Resource:
    Download or clone the repository from GitHub:
    :point_right: GitHub - Redis-Connector

  2. Configure Your Server:
    Add the following to your server.cfg:

    ensure redis-connector  
    set redis_host "127.0.0.1"       # Replace with your Redis host  
    set redis_port 6379              # Default port  
    set redis_password ""            # Optional password  
    set redis_use_ssl false          # Enable SSL/TLS if needed  
    
  3. Start Using Exports or the Library:
    Example for a quick ping:

    local response = exports["redis-connector"]:ping()  
    print("Ping response:", response)  
    

For detailed usage examples, check out the documentation.


:bar_chart: Performance Metrics

Redis-Connector includes a redis_stats command for real-time insights into:

  • Execution counts
  • Total and average durations for Redis commands

Perfect for optimizing your server!


:handshake: Contribute

This resource is open-source and welcomes contributions! If you have ideas, features, or fixes, feel free to open a pull request.


:memo: License

Redis-Connector is distributed under the MIT License, ensuring freedom for both private and commercial use.


Redis-Connector is here to simplify and enhance your serverโ€™s Redis integration. Give it a try and share your feedback! :rocket:

NB: This is the first version and there may be bugs, if you have any there is just to make an issue on github or if you have fixed the problem yourself to make a pull request.

Happy scripting!
Purpose-Dev

7 Likes