https://github.com/mrinjamul/gitignore-service
A web service to help you with [dot] gitgnore files for git repositories.
https://github.com/mrinjamul/gitignore-service
Last synced: 5 months ago
JSON representation
A web service to help you with [dot] gitgnore files for git repositories.
- Host: GitHub
- URL: https://github.com/mrinjamul/gitignore-service
- Owner: mrinjamul
- License: mit
- Created: 2024-08-19T09:15:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T20:33:54.000Z (almost 2 years ago)
- Last Synced: 2025-03-09T16:42:10.321Z (over 1 year ago)
- Language: Go
- Size: 194 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gitignore-service
A web service to help you generate [.gitignore] files for Git repositories.
Just simply download gitignore file by,
```shell
curl -s "http://localhost:8080/api/gi/get?for=go" -o .gitignore
```
## Features
- **Generate `.gitignore` Files**: Easily generate `.gitignore` files for multiple languages and frameworks.
- **API Endpoints**: Access various endpoints to fetch `.gitignore` templates and check service health.
- **Health Check**: Monitor the service health with detailed health check endpoints.
- **Static File Serving**: Serve static files like images and documents from the `/static` endpoint.
## Installation
### Prerequisites
- Go 1.18 or later
- Git
### Clone the Repository
```shell
git clone https://github.com/mrinjamul/gitignore-service.git
cd gitignore-service
```
### Load Environment Variables
For Linux,
```sh
export $(cat .env | xargs)
```
For Windows,
```powershell
Get-Content .env | ForEach-Object { if ($_ -and $_ -notmatch '^\s*#') { $parts = $_ -split '=', 2; [System.Environment]::SetEnvironmentVariable($parts[0].Trim(), $parts[1].Trim()) } }
```
### Install Dependencies
```shell
go mod download
```
### Running the Application
```shell
go run .
```
## Usage
**Base URL**: `http://localhost:8080`
**Endpoints**:
- `GET /static/*filepath` --> Serves static files.
- `GET /` --> Main page.
- `GET /api/gi/` --> Fetch list of `.gitignore` files.
- `GET /api/gi?for=go` --> Fetch a specific `.gitignore` files.
- `GET /api/gi/get?for=go` --> Download a specific `.gitignore` file.
- `GET /api/health` --> Health check endpoint.
- `GET /api/health/full` --> Detailed health check.
## Contributing
Contributions are welcome! To contribute:
1. **Fork the repository**:
Click the "Fork" button at the top right of the repository page on GitHub.
2. **Create a new branch**:
```shell
git checkout -b feature-branch
```
3. **Commit your changes**:
```shell
git commit -am 'Add new feature'
```
4. **Push to the branch**:
```shell
git push origin feature-branch
```
5. **Create a new Pull Request**:
Go to the repository on GitHub, switch to your branch, and click "New Pull Request".
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contact
For any questions or issues, please open an issue on GitHub or contact the project maintainer.