ozean

module
v0.0.0-...-81735e3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT

README

Ozean

Ozean is a simple implementation of an RSS reader made with Go.

Requirements

All you need is the newest version of Go and Git.

Building the project

Clone the project with git.

git clone https://codeberg.org/ozean/ozean.git

Go into the ozean directory and execute

go run ./scripts/build

All the binaries inside the cmd directory will be built and stored inside of ./bin inside the ozean directory.

Running the project

The project consists of two applications, the server and an updater. The server serves files and responds to requests. The updater creates all required tables and updates their entries every 8 hours. Both applications can run independently of each other.

Running the server

The server can be run with

go run ./cmd/ozean

or the binary with

./bin/ozean
Flags
  • -p: Launches the server in production with TLS. Additionally, it launches an HTTP server, that redirects all requests to HTTPS. Requires environment variables. OZEAN_DB_PATH is the path to the SQLite database file. If it doesn't exist, it creates one. The default is ozean.db. OZEAN_CERT_FILE consists of the path to the SSL certificate, and OZEAN_KEY_FILE consists of the path to the matching private key e.g.
//.profile
export OZEAN_ADDR_HTTP=:8080
export OZEAN_ADDR_HTTPS=:4343
export OZEAN_DB_PATH=ozean.db
export OZEAN_CERT_FILE=/path/to/cert_file
export OZEAN_KEY_FILE=/path/to/key_file

On Linux, also make sure that the user, that runs the server, has full access to the paths.

Examples
  • Development:
go run ./cmd/ozean
  • Production:
./bin/cmd -p
Scripts

Go is used to create all scripts to simplify development. To execute a script, run go run {script_name} where {script_name} is one of the options below.

  • build builds all the binaries in the cmd directory.
  • dev runs all required programs for development. It compresses the static files and launches the server.
  • test runs all tests.
  • update_db fetches all feeds and updates the database.

Directories

Path Synopsis
cmd
ozean command
internal
dom
pkg
is
Package is implements functions for testing to assure that values are in a desired state.
Package is implements functions for testing to assure that values are in a desired state.
scripts
build command
create_user command
dev command
test command
update_db command

Jump to

Keyboard shortcuts

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