292e24978d
Started work on a new basic frontend, with some magic code from @tomhodgins (Tom Hodgins) for templating and processing data, which was the primary purpose for considering a full-fledged JavaScript framework. Fairly simple right now, with minimal "bling", and seems "functional enough". Might need to consider options for using less or no JS down the line if there is demand. As part of this frontend, actually implemented route logic for fetching a sorted list of providers (might be worth investigating whether storing this final result in memory is worth the performance to memory trade-off). Also fixed a bug where adding "/" to the end of a provider name without a file path would result in a 404. This was addressed with some Regex filtering on the path that should be able to handle that matching. |
||
---|---|---|
assets/web | ||
auth | ||
common | ||
files | ||
router | ||
.gitignore | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
webserver.go |
nas
small go nas platform for my raspberry pi
usage
configuration
unlike the initial version of this project, the current build uses providers to determine how to handle various
functions related to files. currently, two are implemented, disk
and backblaze
, since they are the primary providers
i use myself. the providers you would like to use can be added to providers.yml
alongside the binary.
for example, here is a sample configuration implementing both of them:
disk:
provider: disk
path: /tmp/nas
backblaze:
provider: backblaze
config:
appKeyId: APP_KEY_ID
appId: APP_ID
bucket: BUCKET_ID
(read more here: #providers)
running
after adding the providers you would like to use, the application can be run simply with ./nas
.
building
this project uses go modules and a makefile, so building should be relatively straightforward.
make
will build the project for your system's architecture.make pi
will build the project with theGOOS=linux GOARCH=arm GOARM=5 go
flags set for raspberry pis.
api
initially the heavy lifting was done by the server, but the need for a better frontend was clear.
full documentation coming soon once actual functionality has been nailed down.
providers
// todo
credits
svg icons via https://iconsvg.xyz
raspberry pi svg via https://www.vectorlogo.zone/logos/raspberrypi/index.html