Development
In this section, we’ll explore how to contribute to JioTV Go and make customizations to suit your needs. Whether you’re interested in development using Docker Compose or diving into Go programming, we’ve got you covered.
Build from Source
To build JioTV Go from source, you’ll need to have Go installed on your system. If you don’t have Go installed, you can download it from here.
Clone
Let’s start by cloning the repository:
Linux/macOS:
git clone https://github.com/atanuroy22/jiotv_go.git
cd jiotv_go
Windows (PowerShell):
git clone https://github.com/atanuroy22/jiotv_go.git
cd jiotv_go
Build
Now, let’s build the project:
Linux/macOS:
go build . -o build/jiotv_go
Windows (PowerShell):
go build . -o build/jiotv_go.exe
Run
Finally, let’s run the server:
Linux/macOS:
./build/jiotv_go [commands]
Windows (PowerShell):
.\build\jiotv_go.exe [commands]
Docker
-
Run with Docker Compose:
- Run the command:
This will automatically reload the server when you make changes to the code indocker-compose up.goand.htmlfiles.
- Run the command:
-
Running the Server in Background:
- To run the server in the background, use:
docker-compose up -d
- To run the server in the background, use:
-
Stop the Server:
- To stop the server, run:
docker-compose down
- To stop the server, run:
-
Access JioTV Go:
- The server will be listening at http://localhost:5001.
-
Set Environment Variables:
- You can set environment variables in the
.envfile for customizations.
- You can set environment variables in the
Local Development
JioTV Go is powered by Golang, making it an exciting project for developers to explore and contribute to. Here’s how you can set up and run the server using Go:
-
Ensure You Have Golang Installed:
- First, make sure you have Golang installed on your system.
-
Start the Server:
Linux/macOS:
go run ./cmd/jiotv_goWindows (PowerShell):
go run .\cmd\jiotv_goPlease note that you’ll need to stop and restart the server manually when you make changes to the code.
-
Enable Debugging and Auto-Reloading:
To enable automatic reloading on template changes in the
viewsfolder and enable debug logs in the console/terminal:Linux/macOS:
JIOTV_DEBUG=true JIOTV_LOG_TO_STDOUT=true go run main.go serve --host 127.0.0.1 --port 5001Windows (PowerShell):
$env:JIOTV_DEBUG="true"; $env:JIOTV_LOG_TO_STDOUT="true"; go run main.go serve --host 127.0.0.1 --port 5001
That’s it! You’re now all set to explore and contribute to JioTV Go. Happy coding! 🖥️👩💻👨💻
Customize the Look with TailwindCSS
At JioTV Go, we use the versatile TailwindCSS for styling our project. If you’re eager to make some style enhancements, here’s how you can do it:
-
Ensure You Have NodeJS Installed:
- Make sure you have NodeJS installed on your system.
-
Navigate to the
webDirectory:- Open a new terminal window and navigate to the project’s root directory. Then, switch to the
webdirectory by running according to your system: Linux/macOS:
cd webWindows (PowerShell):
cd web - Open a new terminal window and navigate to the project’s root directory. Then, switch to the
-
Install Dependencies:
- Install the necessary dependencies by running according to your system: Linux/macOS/Windows:
npm install -
Real-Time TailwindCSS Updates:
To keep TailwindCSS up to date with your changes in real-time, by running according to your system:
Linux/macOS/Windows:
npm run watch -
Build Minified CSS:
- Once you’re satisfied with your style modifications, it’s time to build the minified CSS file:
Linux/macOS/Windows:
npm run buildnpm run build
Now you have the flexibility to customize the look and feel of JioTV Go to match your preferences.
Let’s Make JioTV Go Better Together!
Report Bugs
Found a pesky bug? No worries! Please help us improve JioTV Go by creating an issue here. Be sure to include detailed steps to reproduce the bug, describe the expected behavior, and, if possible, attach screenshots. Your feedback is invaluable!
Ready to Contribute? Join the Journey!
We wholeheartedly welcome your contributions. If you have ideas, fixes, or enhancements in mind, don’t hesitate to create a pull request with your changes. For significant alterations, start by creating an issue to discuss your plans with us. Together, we can make JioTV Go even more incredible.
Thank you for considering contributing to JioTV Go, and happy coding!