countgo

module
v0.0.0-...-1cd9d81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: MIT

README

countgo

Go Report Card FOSSA Status

Hobby project.

It contains:

  • Web server serving static website with TLS. (previously - 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 tool
    • mkcert -install
    • mkcert localhost 127.0.0.1
  • Production:
    • Install certbot for automatic obtaining/renewing Let's Encrypt certificates
    • ./certbot-auto certonly

License

FOSSA Status

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL