Simple Google Cloud Run function to redirect naked domain to any subdomain (defaults to www
).
To use Google Cloud Run Functions, you need the following APIs enabled:
- Cloud Build API (
cloudbuild.googleapis.com
) - Cloud Functions API (
cloudfunctions.googleapis.com
) - Cloud Logging API (
logging.googleapis.com
) - Cloud Pub/Sub API (
pubsub.googleapis.com
)
# Run locally
$ npm run dev
# Build for production
$ npm run build