diff --git a/asteroid.lisp b/asteroid.lisp index adcb460..4f638b5 100644 --- a/asteroid.lisp +++ b/asteroid.lisp @@ -471,6 +471,14 @@ :default-stream-url (format nil "~a/asteroid.aac" *stream-base-url*) :default-stream-encoding "audio/aac")) +;;; ParenScript JavaScript Routes +;;; These routes serve dynamically compiled ParenScript as JavaScript +;;; MUST come BEFORE the static file route to override specific JS files + +(define-page js-auth-ui #@"/static/js/auth-ui.js" () + (:content-type "application/javascript") + (generate-auth-ui-js)) + ;; Configure static file serving for other files (define-page static #@"/static/(.*)" (:uri-groups (path)) (serve-file (merge-pathnames (format nil "static/~a" path) @@ -855,13 +863,6 @@ (format t "~%Received interrupt, stopping server...~%") (stop-server)))) -;;; ParenScript JavaScript Routes -;;; These routes serve dynamically compiled ParenScript as JavaScript - -(define-page js-auth-ui #@"/static/js/auth-ui.js" () - (:content-type "application/javascript") - (generate-auth-ui-js)) - (defun ensure-radiance-environment () "Ensure RADIANCE environment is properly configured for persistence" (unless (radiance:environment)