Make spiffy work with openssl even in statically-linked binary.
This commit is contained in:
		
							parent
							
								
									fac8d8f4f1
								
							
						
					
					
						commit
						002d677769
					
				
					 3 changed files with 14 additions and 26 deletions
				
			
		|  | @ -87,18 +87,16 @@ | |||
| (print "Port: " port) | ||||
| (print "SSL: " ssl?) | ||||
| (when ssl? | ||||
|   (print "  Certificate:" (-certificate-)) | ||||
|   (print "  Key:" (-key-))) | ||||
|   (print "  Certificate: " (-certificate-)) | ||||
|   (print "  Key: " (-key-))) | ||||
| 
 | ||||
| (define listener | ||||
|   (if ssl? | ||||
|       (ssl-listen port) | ||||
|       (ssl-listen* port: port | ||||
| 		   certificate: (-certificate-) | ||||
| 		   private-key: (-key-)) | ||||
|       (tcp-listen port))) | ||||
| 
 | ||||
| (when ssl? | ||||
|   (ssl-load-certificate-chain! listener (-certificate-)) | ||||
|   (ssl-load-private-key! listener (-key-))) | ||||
| 
 | ||||
| (when (and (-user-) (-group-)) | ||||
|   (switch-user/group (-user-) (-group-))) | ||||
| 
 | ||||
|  | @ -110,15 +108,6 @@ | |||
|      (password . ,(-db-pass-))))) | ||||
| (print dbconn) | ||||
| 
 | ||||
| (define (handle-request-by-path path) | ||||
|   (print (->string path-lst) (length path)) | ||||
|   (define body | ||||
|     (cond ((equal? path-lst '(/ "")) | ||||
| 	   (print "index") | ||||
| 	   ) | ||||
| 	  (else | ||||
| 	   "error")))) | ||||
| 
 | ||||
| (define (handle-api-calls) | ||||
|   #f) | ||||
| 
 | ||||
|  | @ -144,7 +133,12 @@ | |||
| 		   (when (not (handle-api-calls)) | ||||
| 		     (send-response #:body (frontend-lookup "index.html")))))))))) | ||||
| 
 | ||||
| (debug-log (current-error-port)) | ||||
| (accept-loop listener | ||||
| 	     (if ssl? | ||||
| 		 ssl-accept | ||||
| 		 tcp-accept)) | ||||
| 		 tcp-accept) | ||||
| 	     (if ssl? | ||||
| 		 (lambda (p) | ||||
| 		   (tcp-addresses (ssl-port->tcp-port p))) | ||||
| 		 tcp-addresses)) | ||||
|  |  | |||
|  | @ -12,9 +12,6 @@ function App() { | |||
|   // State to store an array of scanned results for history tracking | ||||
|   const [scanHistory, setScanHistory] = useState([]); | ||||
| 
 | ||||
|   // Initialize audio for the beep sound effect | ||||
|   const beepSound = new Audio('/beep.mp3'); | ||||
| 
 | ||||
|   /** | ||||
|    * Handles the scanning result. | ||||
|    * @param {Error} err - Error, if any, from the scanner. | ||||
|  | @ -26,9 +23,6 @@ function App() { | |||
|       setCurrentData(result.text); | ||||
|       setScanHistory(prevHistory => [...prevHistory, result.text]); | ||||
| 
 | ||||
|       // Play the beep sound for successful scan feedback | ||||
|       beepSound.play(); | ||||
| 
 | ||||
|       // Show a success notification using toast | ||||
|       toast.success(`Product scanned: ${result.text}`); | ||||
|     } else { | ||||
|  | @ -42,10 +36,10 @@ function App() { | |||
| 	    <Toaster position="top-right" reverseOrder={false} /> | ||||
| 
 | ||||
| 	    {/* Scanner title */} | ||||
| 	    <div className="title">Scanner</div> | ||||
| 	    <div className="title">BrmInv</div> | ||||
| 
 | ||||
| 	    {/* Barcode scanner component */} | ||||
| 	    <div className="scan"> | ||||
| 	    <div className="scan" style={{border: '1px solid black'}}> | ||||
| 		<BarcodeScannerComponent | ||||
| 		    width={500} | ||||
| 		    height={500} | ||||
|  |  | |||
|  | @ -53,8 +53,8 @@ chicken_cleanup() { | |||
| trap chicken_cleanup INT QUIT | ||||
| 
 | ||||
| # Install required eggs | ||||
| chicken_install spiffy | ||||
| chicken_install openssl | ||||
| chicken_install spiffy | ||||
| chicken_install postgresql | ||||
| 
 | ||||
| # Normal termination cleanup | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue