https://github.com/amdzy/snippet-box
Snippetbox is a web-application, which lets people paste and share snippets of text — a bit like Pastebin or GitHub’s Gists.
https://github.com/amdzy/snippet-box
Last synced: 4 months ago
JSON representation
Snippetbox is a web-application, which lets people paste and share snippets of text — a bit like Pastebin or GitHub’s Gists.
- Host: GitHub
- URL: https://github.com/amdzy/snippet-box
- Owner: amdzy
- License: mit
- Created: 2023-11-25T18:39:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-09T13:57:10.000Z (over 1 year ago)
- Last Synced: 2025-04-12T07:56:24.935Z (8 months ago)
- Language: Go
- Homepage:
- Size: 103 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snippet box
Snippetbox is a web-application, which lets people paste and share snippets of text — a bit like Pastebin or GitHub’s Gists.

### Features
- Authentication. Users can register and sign in.
- Protected endpoints. Only signed-in users can create snippets.
- RESTful routing.
- Middleware.
- MySQL database.
- SSL/TLS web server using HTTP 2.0.
- Generated HTML via Golang templates.
- CRSF protection.
### Development
Generate a self signed https certificate:
```
$ mkdir tls
$ cd tls
$ go run /usr/local/go/src/crypto/tls/generate_cert.go --rsa-bits=2048 --host=localhost
```
Run the app:
```
go run cmd/web
```
Starts the local web server with HTTPS on port 4000 ([https://localhost:4000](https://localhost:4000))