5 ms·
Show HN: Hosty – Image/Text self-hosting for minimalists in PHP
- xrstf 12y agoSome weeks ago, I got tired of using imgur for hosting screenshots and stuff, partially because I was trying to share work-related content and using a public site like imgur doesn't seem appropriate. I then looked around for existing, simple self-hosting tools, but all I found where huge near-community apps like Gallery2, Coppermine, ownCloud or ownstagram (with commenting, rating, folders, tags, ...) or PHP scripts from before there was PHP 5. Long story short: None of them fit my need, so I built my own. It's based on Silex (Symfony2's micro-framework sister) and Twig and only offers the bare minimum. Files are placed in the local filesystem, a database is not needed. Apache2 is the default supported webserver, but we have Hosty in production using nginx over SSL as well. Uploading is only allowed for registered users (and users have to be configured in a config file), viewing is allowed to anyone having the link to a file. It's not intended to be a public file hosting service, so do not try to add some public register form or something like that ;-) Hosty can be used inside a LAN without Internet access; no external resources are being used. It's published under MIT and deliberately doesn't add any promotional links or "Created by Hosty" footers.
- Sir_Cmpwn 12y agoYou missed MediaCrush ;) https://github.com/MediaCrush/MediaCrush https://github.com/MediaCrush/MediaCrush Building your own is easy and fun, though, I don't blame you.
- FabianBeiner 12y agoSometimes I’m missing the Good Ol’ Days. You know, when you where able to download some PHP files as a ZIP, extract them, maybe change some configuration and be done. You didn’t have to bother with a bunch of other tools just to get some script ready. (This is, by the way, no offense to this project at all! I just couldn’t resist to write this.)
- vld 12y agoI agree. For such a simple script, requiring all these tools (npm, bower, composer, grunt), it just doesn't seem practical. Is this how people develop and deploy PHP stuff nowadays?
- okatsu 12y agoAside from Composer (which is a good thing for managing dependencies), I'm not sure why you would think "this is how people develop and deploy PHP stuff nowadays". The author uses these tools out of choice, not convention. Just like some Ruby devs use Bower and others don't.
- bombtrack 12y agoI agree with the other reply -- this isn't so much of an indictment of PHP, as it is front-end development in general. Sure, to keep it simple you could download your JS and PHP deps once and bundle them all up in one nice zip. I think many apps provide a "dist" or "release" bundle (this one, in fact, does) in which you don't have to care about Composer, Bower or npm. However, to properly organize deps or define build processes for development, why not use some of the (frankly) common tools available? It's funny how HN could see a simple unzip-and-go app and scoff "amateur hour hobby project". But if someone takes a more formal approach to their hobby app it can flip and scoff "over-engineered bloated setup".
- xrstf 12y agoThings got more complicated when I decided not to just use CSS/JS from some CDN, but have it locally available. Then I needed to postprocess the CSS to remove @include rules. Most of the build process is meant to create small, versioned files, so users don't need to download full jQuery/Bootstrap stuff. I would feel bad for not optimizing my assets.
- bombtrack 12y agoOh, I fully agree with how you have everything set up and organized. It's clear you tried to be as formal as possible with organizing the app, it's dependencies and build processes, for _development_. People are just misunderstanding that bit or nitpicking. Like I said, it's damned if you do, damned if you don't.
- iancarroll 12y agoHastebin (written in Node) is also cool if you intend on making it public - I put an instance up at https://paste.ian.sh https://paste.ian.sh and I use it every day.
- relaxitup 12y agoLooks good. Bepasty looks similar also, however not sure if it supports fully public url's.