diff --git a/Makefile b/Makefile index 88d50e0..8ef9841 100644 --- a/Makefile +++ b/Makefile @@ -12,35 +12,46 @@ portable: clean all cross: clean mkdir -p bin mkdir -p bin/dela_linux_x64 - mkdir -p bin/dela_linux_x32 + cp -r pages bin/dela_linux_x64 + cp -r scripts bin/dela_linux_x64 + cp -r static bin/dela_linux_x64 + cp COPYING bin/dela_linux_x64 + cp README.md bin/dela_linux_x64 + mkdir -p bin/dela_windows_x64 - mkdir -p bin/dela_windows_arm64 + cp -r pages bin/dela_windows_x64 + cp -r scripts bin/dela_windows_x64 + cp -r static bin/dela_windows_x64 + cp COPYING bin/dela_windows_x64 + cp README.md bin/dela_windows_x64 + mkdir -p bin/dela_darwin_x64 + cp -r pages bin/dela_darwin_x64 + cp -r scripts bin/dela_darwin_x64 + cp -r static bin/dela_darwin_x64 + cp COPYING bin/dela_darwin_x64 + cp README.md bin/dela_darwin_x64 + mkdir -p bin/dela_darwin_arm64 - mkdir -p bin/dela_freebsd_x64 - mkdir -p bin/dela_freebsd_arm64 + cp -r pages bin/dela_darwin_arm64 + cp -r scripts bin/dela_darwin_arm64 + cp -r static bin/dela_darwin_arm64 + cp COPYING bin/dela_darwin_arm64 + cp README.md bin/dela_darwin_arm64 + mkdir -p bin/dela_freebsd_x64 + cp -r pages bin/dela_freebsd_x64 + cp -r scripts bin/dela_freebsd_x64 + cp -r static bin/dela_freebsd_x64 + cp COPYING bin/dela_freebsd_x64 + cp README.md bin/dela_freebsd_x64 cd src && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build && mv dela ../bin/dela_linux_x64 - cd src && CGO_ENABLED=0 GOOS=linux GOARCH=386 go build && mv dela ../bin/dela_linux_x32 cd src && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build && mv dela.exe ../bin/dela_windows_x64 - cd src && CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build && mv dela.exe ../bin/dela_windows_arm64 cd src && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build && mv dela ../bin/dela_darwin_x64 cd src && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build && mv dela ../bin/dela_darwin_arm64 cd src && CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 go build && mv dela ../bin/dela_freebsd_x64 - cd src && CGO_ENABLED=0 GOOS=openbsd GOARCH=arm64 go build && mv dela ../bin/dela_freebsd_arm64 - - - mkdir -p bin/includes - - cp -r pages bin/includes - cp -r scripts bin/includes - cp -r static bin/includes - cp COPYING bin/includes - cp LICENSE* bin/includes - cp README.md bin/includes - clean: rm -rf bin diff --git a/README.md b/README.md index fe93e2e..961bd72 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,80 @@ -# Dela dead simple web TODO list +![Dela](static/images/android-chrome-192x192.png "Dela logo") -## About +# Dela - dead simple web TODO list +## About Dela is a web TODO list application which can be hosted on your server and accessed via browser. Current capabilities include: - Password protected account system - TODO creation - TODO completion +- TODO deletion +- TODO drag-and-drop on categories +- Due date selection on TODO creation ## Build +Dela is written in Go, so you need to have a Go compiler. + +For ease of compilation it is also recommended to have `make`. + +To automatically compile Dela and have a ready-to-go solution, run: ``` make ``` -or manually compile with `go build` inside the `src` directory, move the binary and put it alongside `pages`, `scripts` and `static` (although the path to the contents can be specified via configuration file). +a portable `/bin` directory should appear where binary and base contents are located. + + +### Manual build +Or you can manually compile with `go build` inside the `src` directory. Move the binary and put it alongside `pages`, `scripts` and `static` (or specify the path to the contents directory via configuration file which is created automatically upon first launch). + + +### Portable build +To get a portable archive run: ``` make portable ``` -will create a `dela.zip` archive with all the content directories and the binary which are to be freely transported to other machines (of the same OS and architecture, obviously) +which will create `dela.zip` archive with all the content directories and the binary which can be freely transported to other machines (of the same OS and architecture) + +### Cross compilation +For cross-platform compilation there is: + +``` +make cross +``` + +which cross compiles the project for linux, freebsd, windows and darwin systems. Portable solutions will be put in `/bin` directory in the corresponding subdirectories. ## Use -After the first run a configuration file will be put alongside the executable, upon the second launch server will start and the service will be accessible on the specified port. +### Configuration file +After the first run a configuration file will be put alongside the executable, upon the second launch the server will start and the service will be accessible on the specified port. + +Currently configuration file contains these filelds: +```json +{ + "port": 8080, + "cert_file_path": "", + "key_file_path": "", + "base_content_dir": ".", + "production_db_name": "dela.db" +} +``` + +| Field | Description | +| --- | ----------- | +| port | port on which the service will run | +| cert_file_path | path to the SSL certificate file | +| key_file_path | path to the SSL certificate key file | +| base_content_dir | path to the directory with `pages`, `scripts` and `static` subdirectories | +| production_db_name | SQLite3 database file path | + + +### SSL certificates +If you intend to use SSL certificates - there are corresponding fields in the configuration file. ## License Dela is licensed under AGPL \ No newline at end of file