4 ms·
This isn't directly related to the post, but it's a CMS related question: does anybody know of a simple "static file" CMS that also lets you deploy server side
by kennywinker 4y ago
This isn't directly related to the post, but it's a CMS related question: does anybody know of a simple "static file" CMS that also lets you deploy server side javascript functions? It's a weird use case, so I suspect there may not be. I've solved it by using a static site generator and a nginx reverse proxy to a node server - but it's a lot of complexity for my use case (using stripe to sell stuff, but stripe checkout requires server side session creation).
Edit: Netlify Edge functions seems to be pretty much exactly what I'm describing (drop js/ts files in a directory, deploy with your static site). The only problem with it for me is it's not self-hosted. Serveless functions would work, tho the separate deployment adds a layer of complexity, and I'd have to learn CORS finally lol
- surfpel 4y agoNot exactly what you asked for, but if you use S3 + CloudFront, you can use javascript functions in CloudFront that can modify the request to/from the client & to/from the S3 bucket. Does things like URL redirects, header manipulation, auth... I use it to redirect ~/path/to/item/ to ~/path/to/item/index.html for my static site. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-functions.html https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...
- IanCal 4y agoNetlify? Edge functions and functions may be what you're after https://www.netlify.com/products/#netlify-edge-functions https://www.netlify.com/products/#netlify-edge-functions
- kennywinker 4y agoOh very cool! Yeah, Netlify Edge functions are pretty much exactly what I'm after... except I was hoping for something self-hosted.
- IanCal 4y agoMaybe don't focus so much on the static site part, and have a very slightly dynamic site where the majority of your content is just paths that lead to stuff in /static. So rather than trying to bolt a dynamic bit to static hosting, making the simplest site with something like server.js
- Already__Taken 4y agomaybe openfaas then?
- mmcnl 4y agoIsn't this what serverless functions are for? Vercel, Netlify, Firebase would suit your needs.
- somishere 4y agoCloudflare Pages works well as a serverless option for this, and without the separate deployment for functions, so no CORS required. Couldn't recommend more.
- deleted 4y ago[deleted]