Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 1.83 KB

README.md

File metadata and controls

66 lines (41 loc) · 1.83 KB

Examples

This directory provides an example demonstrating the use of the gorm-multitenancy package with various configurations:

Getting Started

To run this example on your local machine, follow these steps:

Step 1: Clone the Repository

git clone https://github.com/bartventer/gorm-multitenancy.git
cd gorm-multitenancy

Step 2: Run the Example

This example supports various configurations through command-line options.

Usage

go run -C examples . [options]

Options

  • -server string

    • Description: Specifies the HTTP server to run (and gorm-multitenancy middleware to use)
    • Options: echo, gin, iris, nethttp
    • Default: echo
  • -driver string

    • Description: Specifies the gorm-multitenancy database driver.
    • Options: postgres, mysql
    • Default: postgres

Examples

  • Run with default options:

    go run -C examples .
  • Run with the NetHTTP server and MySQL driver:

    go run -C examples . -server=nethttp -driver=mysql

Note

To enable debug logging, set the GMT_DEBUG environment variable to true. This can be helpful for troubleshooting or understanding the internal workings of the application.

Interacting with the API

Please see API Usage for more examples on how to interact with the server.

Contributing

All contributions are welcome! See the Contributing Guide for more details.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.