new examples

This commit is contained in:
Andras Bacsai
2025-12-26 11:40:00 +01:00
parent 35e4d33085
commit d3a2a9d83b
1164 changed files with 101362 additions and 160055 deletions

View File

@@ -0,0 +1,30 @@
/*
|--------------------------------------------------------------------------
| Routes file
|--------------------------------------------------------------------------
|
| The routes file is used for defining the HTTP routes.
|
*/
import router from '@adonisjs/core/services/router'
// Runtime env vars (read at server startup)
const runtimePrivateVar = process.env.RUNTIME_PRIVATE_VAR || 'default-value'
const runtimePublicVar = process.env.RUNTIME_PUBLIC_VAR || 'default-value'
console.log('=== Runtime Variables ===')
console.log('RUNTIME_PRIVATE_VAR:', runtimePrivateVar)
console.log('RUNTIME_PUBLIC_VAR:', runtimePublicVar)
router.get('/', async () => {
return {
message: 'Hello from AdonisJS!',
runtimePrivateVar,
runtimePublicVar,
}
})
router.get('/health', async () => {
return { status: 'ok' }
})