File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 * npm run health
99 */
1010
11- const https = require ( 'https' ) ;
12- const http = require ( 'http' ) ;
11+ import https from 'https' ;
12+ import http from 'http' ;
1313
1414const SITE_URL = process . env . SITE_URL || 'https://asperbeautyshop-com.lovable.app' ;
1515const TIMEOUT_MS = 10000 ;
@@ -164,11 +164,9 @@ async function main() {
164164}
165165
166166// Run if called directly
167- if ( require . main === module ) {
168- main ( ) . catch ( error => {
169- console . error ( 'Fatal error:' , error ) ;
170- process . exit ( 1 ) ;
171- } ) ;
172- }
167+ main ( ) . catch ( error => {
168+ console . error ( 'Fatal error:' , error ) ;
169+ process . exit ( 1 ) ;
170+ } ) ;
173171
174- module . exports = { checkEndpoint, checkHealthEndpoint } ;
172+ export { checkEndpoint , checkHealthEndpoint } ;
Original file line number Diff line number Diff line change 88 * npm run test:brain
99 */
1010
11- const https = require ( 'https' ) ;
12- const http = require ( 'http' ) ;
11+ import https from 'https' ;
12+ import http from 'http' ;
1313
1414const SITE_URL = process . env . SITE_URL || 'https://asperbeautyshop-com.lovable.app' ;
1515const SUPABASE_URL = process . env . VITE_SUPABASE_URL || 'https://qqceibvalkoytafynwoc.supabase.co' ;
@@ -191,11 +191,9 @@ async function main() {
191191}
192192
193193// Run if called directly
194- if ( require . main === module ) {
195- main ( ) . catch ( error => {
196- console . error ( 'Fatal error:' , error ) ;
197- process . exit ( 1 ) ;
198- } ) ;
199- }
194+ main ( ) . catch ( error => {
195+ console . error ( 'Fatal error:' , error ) ;
196+ process . exit ( 1 ) ;
197+ } ) ;
200198
201- module . exports = { testSupabaseConnection, testBeautyAssistantEndpoint, testConciergePresence } ;
199+ export { testSupabaseConnection , testBeautyAssistantEndpoint , testConciergePresence } ;
You can’t perform that action at this time.
0 commit comments