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

What I would find interesting is a page which lists all steps to be performed on the command line to create a web application from scratch.

Say we start with a fresh Debian install, the first line might be

    apt update && apt upgrade
The second line might be

    apt install php
Or Python or Node. And then the commands to create the project directory, switching to it, installing a webserver etc would follow. At some point there would be a line

    echo "<h1>Hello World</h1>" > index.php
At this point, we accomplished serving a static page.

And then line by line, a full web application is created, with routing, templating and user accounts. With no other tool than the command line. So the page would never say "Click on this then click on that..." or "Depending on your environment...". No, you could simply copy every line, paste it to your terminal and thereby create the exact same application.

Ideally the page would have one column of commands for every typical approach like Django, Flask, Laravel, Symfony, NextJS etc.

I would expect this page to start with just one approach - say Django. And then accept pull requests from experts for the other approaches.

So we would have side by side examples of what steps are needed in different environments to create a typical web app nowadays.

I had this idea for a while but so far did not get around doing it. If someone wants to collaborate on it, hit me up.



I feel like there are so many of these tutorials. The problem is that a person who wants to learn React generally does not care about Debian and something like apt update && apt install nginx.

Then depending on who's writing the tutorial, the content ranges from "create a VM and issue these commands" to gcloud commands to spawn VMs.

Usually, when a student doesn't know anything about React, they won't know anything about Debian, and the whole tutorial will go over their head. Alternatively, it will be highly shallow. Or, usually, both.


The difference to the other tutorials is that this one would not have prerequisites in terms of tools and services. It would not require anything but to copy+paste lines to go along. And that the format of shell commands makes the different approaches very easily compareable. And reproducable. You can put all of the commands into a script and have your own automated template to start new projects.

A single Docker container can be used like a fast, lightweight VM. And from there on it is just copy+paste.

So on a Linux machine the process would be:

    1: docker run -v $(pwd):/var/www --rm -it -p 80:80 debian:11-slim
    2: Copy+Paste the lines
    3: Enjoy the running web app


Docker is a tool prerequisite. For example, on a SELinux system, docker run -v $(pwd):/var/www will cause issues (because you need -v "$(pwd)":/var/www:z). Also, isn't -v deprecated?

What I'm highlighting is:

* The knowledge depth and time required on your part to maintain the text such that it works on all supported systems

* The fact that you're depending on a number of tools that might become obsolete quite fast, which might throw a wrench into your text.

** For example, Docker stops supporting CLI due to licensing. Linux splinters off to podman, Windows creates its own tool, macOS users will generally continue working with Docker. You'll then be forced to migrate to a different tool, like Vagrant.

Rather than create a text that's a "bring your own developer workstation", create a webpage that I pay $15 for monthly, you record a video explaining a concept, and then you have a button that says "spin up a lab for X". This throws me to a controlled environment, e.g. in AWS, where you tell me the exact steps that will achieve what I want to achieve.


On the other hand , a tutorial like this needs to be actively maintained as packages come and go . It’s essentially a documentation


Yes. I would expect the article to become an "eternal cornerstone of web development" which evolves with the stacks.

After a few years, the history if it would be very interesting. It would show how much maintenance a minimal web app based on the different approaches needed.


Apart from the Debian command what else you need to learn from Django? I'm writing python based web application development tutorial here https://rajasimon.io


Writing code as a sequence of "echo ... >> ..." lines would be awful. It should at least use a text editor (doesn't lose the copy-paste functionality).


With a Texteditor you need to "describe" the process. Like "Open your text editor and create a file called /etc/apache2/sites-enabled/000-default.conf then put the following code into it ... then save it, make sure the access rights are... make sure the file encoding is..., make sure it does or does not contain a final carriage return ..."

With the shell, all of this can be combined in one command that you can easily read, understand, copy and paste and which is exactly reproducable:

    cat << 'EOF' > /etc/apache2/sites-enabled/000-default.conf
    WSGIPythonPath /var/www/mysite
    <VirtualHost *:80>
        WSGIScriptAlias / /var/www/mysite/mysite/wsgi.py
        <Directory /var/www/mysite/mysite>
            <Files wsgi.py>
                Require all granted
            </Files>
        </Directory>
    </VirtualHost>
    EOF


But no one will want to exactly copy and paste everything from the tutorial (e.g. you'd put the name of your thing instead of "mysite") so by doing it that way you're forcing people to copy and paste it into a text editor, make the edits, and then copy and paste into a terminal. It all seems overly complicated. To be editable and equivalent to your example, all you need is two instructions:

1. Run this:

  $EDITOR /etc/apache2/sites-enabled/000-default.conf
2. Now paste in this:

  [file contents]
Access rights are a separate command in both methods, and if you're really concerned about file encodings (seems unlikely for this sort of thing), that's either an editor setup step at the very start, or one command to convert in either method.


To test it, I would copy all commands verbatim and play around with the running web application afterwards. Say to try Django or some other framework which I have not used before.

Even just reading it would give me an unambiguous insight into the concepts of the framework.

To "fork" it, I would copy all commands into a shellscript and then change something like "mysite" via search+replace. In vim it would be: :%s/mysite/yoursite/gc to change all occurances of "mysite" to "yoursite" and be shown each replacement before it takes place.


That sounds like a Dockerfile


Similar but somewhat different. You would normaly not have

echo "<h1>Hello World</h1>" > index.php

in a Dockerfile.


I want to work on this . This is interesting.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: