Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statik/fs: no zip data registered #55

Closed
rafaelspaic opened this issue Nov 27, 2019 · 4 comments
Closed

statik/fs: no zip data registered #55

rafaelspaic opened this issue Nov 27, 2019 · 4 comments
Labels
faq Closed issue to link back to for commonly found problems question OP is unsure about behavior

Comments

@rafaelspaic
Copy link

sorry if I'm missing something really obvious, I don't have any previous experience with go and I'm trying to run this :)

I tried it in two different servers (debian 9 and ubuntu 19.10) with the same results..

  • got the latest version of go
  • go get -u github.com/nektro/andesite

I see it gets and auto compiles to ~/go/bin/andesite so I tried to run this first and the result is

2019-11-27 22:33:04: Initializing Andesite...
2019-11-27 22:33:04: Reading configuration from /home/rafa/.config/andesite/config.json
2019-11-27 22:33:04: statik/fs: no zip data registered

then I went to ~/go/src/github.com/nektro/andesite

  • go build && ./andesite
    (same result)

last thing I tried was changing my config.json to

{
"version": 2,
"root": "/home/rafa",
"public": "/home/rafa/public",
"port": 8000
}

which made no difference

any help would be appreciated, thank you

@nektro
Copy link
Owner

nektro commented Nov 28, 2019

the missing step is located in scripts/build_all.sh but thanks for reminding me I missed this out in the Development section of the README. In order to fix this issue you also have to run:

go get -v -u github.com/rakyll/statik

and then from within, $GOPATH/src/github.com/nektro/andesite then also run:

$GOPATH/bin/statik -src="./www/"

this will use the statik program to pack the www/ folder into the code so that when you run go build the assets will be built into the binary.

@nektro
Copy link
Owner

nektro commented Nov 28, 2019

however, as this step is only done during local development, and is done automatically during the automated builds I should make it so that this error is not thrown when statik is not ran.

@rafaelspaic
Copy link
Author

It's working perfect now! 😄 this is exact what I needed for my project, really easy to add my discord friends by id, etc. so it embeds the /www/ in the binary and uses the embedded stuff only if it can't find the www folder, correct? thank you again 👍

@nektro
Copy link
Owner

nektro commented Nov 30, 2019

Yes, statik is used so that the www/ assets can be embedded and Andesite can be used as a standalone binary. However, having a local www/ folder or using a theme allows you to override the use of the embedded assets.

@nektro nektro closed this as completed Nov 30, 2019
@nektro nektro added faq Closed issue to link back to for commonly found problems question OP is unsure about behavior labels Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq Closed issue to link back to for commonly found problems question OP is unsure about behavior
Projects
None yet
Development

No branches or pull requests

2 participants