https://github.com/aracki/countgo
Hobby project - various stuff around aracki.me
https://github.com/aracki/countgo
golang mongodb youtube-api
Last synced: 2 months ago
JSON representation
Hobby project - various stuff around aracki.me
- Host: GitHub
- URL: https://github.com/aracki/countgo
- Owner: Aracki
- License: mit
- Created: 2017-11-08T14:57:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T11:57:14.000Z (about 1 year ago)
- Last Synced: 2025-01-03T09:44:56.652Z (4 months ago)
- Topics: golang, mongodb, youtube-api
- Language: HTML
- Homepage: https://aracki.me/
- Size: 3.86 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# countgo
[](https://goreportcard.com/report/github.com/aracki/countgo)
[](https://app.fossa.io/projects/git%2Bgithub.com%2FAracki%2Fcountgo?ref=badge_shield)Hobby project.
It contains:
* Web server serving [static](https://github.com/Aracki/countgo/tree/master/static) website with TLS. (previously - [Aracki/aracki.me](https://github.com/Aracki/aracki.me))
* Unique site visits counter with MongoDB.
* Playing with Youtube playlists/videos.## Prepare app
Create configuration files in the root directory according to approprate template files.
1. `mongo_config.yml`
2. `config.yml`Download all libraries into your vendor folder:
1. `dep init`
2. `dep ensure`## Run app
1. Run mongodb: `mongod --dbpath data/db/`
2. Run application: `go run cmd/aracki/main.go -y=false >> logfile 2>&1 &` from the root of the project.Use flag `-m=false` to run without mongodb.
Use flag `-y=false` to run without gotube.
Ampersand `&` will start the process in the background.
Pipe to `tee logfile` to split logs into stdout and file.## Set up TLS
* Local development:
* Install [mkcert](https://github.com/FiloSottile/mkcert) tool
* `mkcert -install`
* `mkcert localhost 127.0.0.1`
* Production:
* Install [certbot](https://github.com/certbot/certbot) for automatic obtaining/renewing Let's Encrypt certificates
* `./certbot-auto certonly`
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FAracki%2Fcountgo?ref=badge_large)