A modern web application for easily sharing and managing code snippets with others. Built with Go, this application allows developers to create, store, and share code snippets with syntax highlighting and easy-to-use interface.
- Create and share code snippets with syntax highlighting
- Public and private snippet support
- Easy-to-use RESTful API
- Secure authentication
- Search and filter snippets
- Copy snippets with one click
- Go 1.21 or higher
- MySQL 8.0 or higher
- Git
- Clone the repository:
git clone https://github.com/yourusername/snippetshare.git
cd snippetshare
- Install dependencies:
go mod download
- Set up MySQL database:
# Login to MySQL as root
mysql -u root -p
# Create database and user (in MySQL shell)
CREATE DATABASE snippetshare;
CREATE USER 'snippetshare'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON snippetshare.* TO 'snippetshare'@'localhost';
FLUSH PRIVILEGES;
EXIT;
- Run the application:
go run cmd/server/main.go
The application will be available at https://localhost:4000
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.