Code Explainers

Code explainers tagged #static-files

python
import hashlib
import os
from datetime import timedelta
 

Serving cacheable static assets in Flask

http-caching etag conditional-requests
Intermediate 8 steps
go
package server
 
import (
	"net/http"

Serving cached static assets in Gin

caching static-files middleware
Intermediate 7 steps
go
package server
 
import (
	"net/http"

Serving a single-page app with Gin

static-files spa routing
Intermediate 7 steps
rust
use axum::{
    http::StatusCode,
    response::IntoResponse,
    routing::get,

Serving an SPA and API with Axum

routing static-files spa-fallback
Intermediate 7 steps