News for hackers. Stuff that matters.
Re:Ask HN: What would be your stack if you are building an M... by skizm on Thursday January 26, 2023 @01:36PM (#34536424)
HTML, css, js, (maybe jquery and font-awesome if I want to get fancy) and all static files dumped in an S3 bucket for as long as I can get away with it, then django if I need anything more. Not that I think python/django is the "best", but it is what I know and it's got all the batteries included out of the box. I've never made a sufficiently advanced UI that required react/vue/etc. So I still just stick with html/css/jquery on the front end.

Semi-related side note: I do use TS/react in my 9-5, but the more I use it professionally, the more I'm convinced there is no need for it outside of trying to get a job, IMO.

Re:Ask HN: What would be your stack if you are building an M... by TekMol on Thursday January 26, 2023 @02:29PM (#34537419)
Very similar to my approch.

One difference: I am in the process of stripping out jQuery from old projects. So I would not use it in new projects anymore. Plain JS is just awesome these days. And it is easier to reason about event listeners you have set yourself than wondering "Where does this mouseover event come from? Maybe its from jQueries hover function? Wouldn't that rather use mouseenter?".

Re:Ask HN: What would be your stack if you are building an M... by shpx on Thursday January 26, 2023 @03:23PM (#34538227)
Instead of an S3 bucket you can use GitHub Pages. You push stuff to the upstream git repo and it gets deployed. It’s free (you have to pay for GitHub Pro if you don’t want to make the source code publicly available) and comes with Fastly CDN if I recall correctly. You just have to configure your custom domain.
Re:Ask HN: What would be your stack if you are building an M... by clusmore on Thursday January 26, 2023 @03:38PM (#34538453)
In the case of static HTML/JS/CSS, the webserver will make the source publicly available to your browser anyway, so that's not really an issue.
Re:Ask HN: What would be your stack if you are building an M... by smackeyacky on Thursday January 26, 2023 @04:42PM (#34539256)
I use a GitHub action to sync to an s3 bucket, works extremely well.

my update.yml:

  name: Update Website
  on:
    push:
      branches:
      - production
  jobs:
    deploy:
      runs-on: ubuntu-latest
      steps:
      - uses: actions/checkout@master
      - uses: jakejarvis/s3-sync-action@master
        with:
          args: 
        env:
          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: 'myregion'
          SOURCE_DIR: 'mydir'
Re:Ask HN: What would be your stack if you are building an M... by Corrado on Friday January 27, 2023 @10:53AM (#34547385)
Just an FYI. You can now use OIDC to authenticate to AWS. This removes the need for hardcoded IDs and KEYs.
Re:Ask HN: What would be your stack if you are building an M... by slenk on Thursday January 26, 2023 @06:46PM (#34540514)
Use GH to push to S3 on commit. Done.
Re:Ask HN: What would be your stack if you are building an M... by retinaros on Thursday January 26, 2023 @05:53PM (#34540045)
I wonder why people like s3 buckets. if your website becomes viral it might become expensive
Re:Ask HN: What would be your stack if you are building an M... by cj on Thursday January 26, 2023 @05:56PM (#34540071)
It’s pretty easy and free to slap a CDN like Cloudflare on top of an S3 bucket
Re:Ask HN: What would be your stack if you are building an M... by codeonline on Thursday January 26, 2023 @06:48PM (#34540530)
There is an AWS CDN available that can be placed in front of the s3 bucket. Also allows for custom domain names, TLS, globally distributed for low latency ec. https://aws.amazon.com/cloudfront/
Re:Ask HN: What would be your stack if you are building an M... by lgreiv on Thursday January 26, 2023 @07:37PM (#34540966)
I posted a link to my photography blog on HN once and had a traffic spike of five digits of visitors above usual and paid AWS less than a coffee at my local barista café to handle that, thanks to an AWS CloudFront CDN in front of it.

There might be better offers out there, but I have no pain that makes me switch away from what works for me, is cheap enough and what I know.

Re:Ask HN: What would be your stack if you are building an M... by sumitb on Friday January 27, 2023 @01:20AM (#34543196)
True. For static only deployments, I would use Firebase or CloudFlare or Vercel or Netlify etc. You get automatic CDN and generous free quota.
Re:Ask HN: What would be your stack if you are building an M... by MidnightRaver on Saturday January 28, 2023 @07:33PM (#34563576)
> I've never made a sufficiently advanced UI that required react/vue/etc.

There is no such UI. Users don't want 'advanced' UI.

Re:Ask HN: What would be your stack if you are building an M... by mohitgangrade on Sunday January 29, 2023 @04:31AM (#34566415)
You should look into Cloudflare Pages. I'm using it for all my sites, and it's completely free. Automatic deploys when you push code to GitHub, serverless functions called workers baked in, and built-in analytics. Not to mention, you get high-speed CDN caching for free.