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

Startup Issues? #31

Closed
davidnewhall opened this issue Jan 8, 2022 · 2 comments
Closed

Startup Issues? #31

davidnewhall opened this issue Jan 8, 2022 · 2 comments

Comments

@davidnewhall
Copy link

I'm out looking for a self-hosted Pastebin service. I'm mostly doing:

  • clone a project
  • run it
  • test it
  • evaluate usefulness for my needs.

I cloned this repo and moved into the pkg/pasty folder, then ran go run .

pasty/$ go run .
2022/01/08 01:02:53 Loading the application configuration...
2022/01/08 01:02:53 Loading the configured storage driver...
2022/01/08 01:02:53 Serving the web resources...

Then I went to http://localhost:8080 and got this.
Screen Shot 2022-01-08 at 1 05 30 AM

Maybe this is expected, but it's certainly not user friendly. So I can back here and scanned through the README more, but found no mention of "how to use" this app. I can only assume what I'm getting from the web interface is not expected, and something is wrong here.

Then, on a whim I did cd ../.. ; go run ./cmd/pasty and got the same output, but this time the web server had actual content. So I looked in the README for the word log but found nothing. This app doesn't seem to log errors, or requests, or anything happening. Is that expected?

I finally tested it. My test is (always) paste a 5MB log file and hit save.
Does it work? Nope, it just spins.
Is it fast, or slow? Slow, and the line numbers seem to misalign with the paste lines while scrolling.
Can it be "loaded" quickly after being saved? It never saved the 5MB paste, and never printed an error.

Small pastes seem to work OK. This is my feedback, hope it's helpful.

@lus
Copy link
Owner

lus commented Jan 8, 2022

Hello, thanks for your feedback. I'll explain some points you made.

Maybe this is expected, but it's certainly not user friendly.

Generally, running the app (or any app) using go run is never meant for production purposes. It's a command used by people who actively develop on a project to avoid rebuilding it every single time.
If you want to run the app on a production system you definitely should build it.
This said, the error you get when running the app while your CWD is cmd/pasty/ is due to a routing error. The app tries to serve the ./web/ directory which does not exist inside the cmd/pasty/ directory.
These aspects are clearly stated in the README (see 'Building from source').

So I looked in the README for the word log but found nothing. This app doesn't seem to log errors, or requests, or anything happening. Is that expected?

I have to admit I did not implement that much logging when I initially started the project. Thanks for bringing this up, I will create an issue on this topic.

I finally tested it. My test is (always) paste a 5MB log file and hit save.

Jup, piping a 5MB string into pasty causes severe performance issues. I don't see the point in having such a huge(!) paste though as the most common use case is sharing small log or code snippets which is handled pretty well.
For bigger payloads a file sharing platform (e.g. https://workupload.com) would be far more suitable in my opinion.

Again, thank you for your test and feedback ^^

@lus lus mentioned this issue Jan 8, 2022
@lus
Copy link
Owner

lus commented Jan 29, 2022

I will close this issue as I created separate issues for all the points you mentioned.
Issues #32 and #37 could be of interest for you.
Feel free to open another issue if you have further questions!

@lus lus closed this as completed Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants