This project is a minimal, private code snippet sharing application built with Go, MySQL, and Tailwind. It's designed to be a personal tool for managing and sharing code snippets privately.
Here you can view it in action: https://ssnipp.com
- Built with Go: The application is powered by a Go web server.
- MySQL Database: Snippets are stored in a MySQL database.
- Tailwind: The frontend is styled using Tailwind.
- .env File: You need to create a
.env
file in the root directory to set up some default configurations.
-
Clone the repository
git clone https://github.com/benitolopez/ssnipp.git cd ssnipp
-
Install dependencies
npm install
-
Create the
.env
fileCreate a
.env
file in the root directory of the project with the following content:PORT=:4000 DEBUG=false ALLOW_SIGNUP=true DB_USERNAME=your_db_username DB_PASSWORD=your_db_password DB_DATABASE=your_db_database DB_TEST_USERNAME=your_db_test_username DB_TEST_PASSWORD=your_db_test_password DB_TEST_DATABASE=your_db_test_database
Replace
your_db_username
,your_db_password
, andyour_db_name
(and test versions) with your actual MySQL credentials. -
Run the application
go run ./cmd/web
or:
npm run dev
The application will start a web server, and you can access it via
http://localhost:4000
. -
Deploy the application
make build/web
This project is maintained as my personal tool for private code snippet sharing. As such, I do not accept pull requests. However, feel free to fork the project and customize it for your own use.
This project was inspired by the book Let’s Go by Alex Edwards. There are a few changes made in this implementation, but I totally recommend the book for anyone interested in learning Go and building web applications.