Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The absolute simplest setup that i've ever seen would be along the lines of the following:

  - PHP on the server, regular .php files that process the requests
  - Apache2/httpd as your web server
  - SQLite as your database (just a file), through PHP's PDO
  - just regular JS/CSS files for additional functionality that you need (e.g. add jQuery/Bootstrap)
  - no Composer or reliance on external dependencies or package management whatsoever
That said, every application that i've seen that has been written this way has been pretty bad - eventually you develop your own badly tested and badly documented abstractions that will slow you down towards the end of the project development and will cripple most of the developers that will need to take over your mess. Furthermore, security is generally an issue, since you should almost never write your own security code under most circumstances, but you probably will do just that with this approach. Also, managing the installation will eventually be a bit problematic, as your current PHP version will be deprecated.

For those reasons (and some others), i'd generally advise people to go with one of the other popular web frameworks with server side rendering:

  - PHP with Laravel/Lumen/Slim
  - Ruby with Rails
  - Python with Django
Now, some might prefer having a separate front end application (Angular, React, Vue, Svelte) from the back end (probably REST for its simplicity), but that's just introducing more complexity into the mix than necessary in this case, even though it has other benefits in regards to eventually scaling and/or swapping out bits of functionality for other technologies down the road.

Personally, i'd look in the direction of using something like MariaDB for the simpler apps that might need to eventually have a separate DB instance, as well as containers for managing the runtimes of everything as well as networking (Docker, Docker Compose, Docker Swarm, rather than something complicated like Kubernetes), but none of that is also strictly necessary.

As for the actual servers, just get an Ubuntu LTS VPS on whatever provider is affordable to you. It has a long life cycle, is generally pretty well documented and pretty boring. That way you can also migrate elsewhere if need be.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: