raftario / filite

A simple, light and standalone pastebin, URL shortener and file-sharing service
MIT License
190 stars 16 forks source link

Use the correct application directories for the platform #13

Closed steven-joruk closed 4 years ago

steven-joruk commented 4 years ago

Platform appropriate directories should be used, the dirs crate is already used so it's easy to do.

Also:

steven-joruk commented 4 years ago

I've updated it to include a fix for #7 in a separate commit since it's the same section of code.

With the existing logic. re-generating a password file would lead to filite running without any feed back for the user, so it looked like it was hung while generating the hash.

I've changed it so no restart is required after a password is entered, and "Listening on port {}" is always shown to make it clear things are working.

raftario commented 4 years ago

Looks all good, will just need to test it once I'm able to do it!

steven-joruk commented 4 years ago

Btw I’d like to add unit tests but I’m not so familiar with actix. I looked at their guide but their examples are basic and didn’t include calls to routes which didn’t include extra arguments such as password hashes or identities. It’s be good to make them easy and intuitive to implement soon.

raftario commented 4 years ago

Yeah never really got unit tests for conplex routes either, I was planning to concentrate on having good integration tests instead. Would still be nice to have unit tests, I guess asking on the subreddit for example projects could be a good start?

raftario commented 4 years ago

I can also add you to the repo contributors if that makes development easier for you btw