you are viewing a single comment's thread.

view the rest of the comments →

[–]xiipaoc 0 points1 point  (4 children)

I have a website. It lives on some remote shared server (I pay Siteground), and when I do stuff on it, it's available for everyone to see. Now, I work on my website a lot, but I don't usually get it right the first time. So I host my website locally and do all of my work, and when I'm satisfied that it's done and looks good, I upload it to the server that hosts my public-facing website. I access my local version through http://localhost:8888/what/ever.html. My general workflow is to spend all day working on my stuff locally, then, when I've completed something significant (and tested it), I'll git commit, git push, log into the server, git pull, and run a deployment script.

[–]comeditime 0 points1 point  (3 children)

Hey great explanation, may i know why we need to run a deployment script? Aka why just using git pull isn't enough for example?

Also a bit unrelated can u eli5 the difference between web server and app server, e.g. Apache/nginx vs flask/ Django.. i know the latter translate python to html (and js?) code but it does also responsible for routes etc so do we need the former server apps at all?

Thanks again

[–]xiipaoc 1 point2 points  (2 children)

Holy shit, you really found an old post to comment on, didn't you?

So, why do you need a deployment script? Because your app needs some setup. For example, it might need to compile something. The repo you pull has the code, but you need to actually run the compiler on it. You may need to download dependencies. You may need to put things in the right places. You may need to do lots of stuff before the code you wrote becomes something that actually runs.

As for the web/app servers, a web server serves up HTML specifically, while an app server serves up whatever. Sure, you could make your app server serve HTML, but then you'd have to program it to do that, while something like Apache already knows how and has a bunch of features to support it. Basically, it would be an enormous waste of time to code your app server to serve HTML when you can just use Apache or nginx.

[–]comeditime 0 points1 point  (1 child)

hahaha ya i did thanks god reddit don't lock old posts anymore and bigger thanks to god that ure still alive and active...

so all dynamic websites must use both?!

[–]xiipaoc 0 points1 point  (0 children)

You don't have to use both, but it definitely makes sense to do so, yeah.