Initial commit
This commit is contained in:
27
app/configs/app.config.ts
Normal file
27
app/configs/app.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Daton } from '../../bundle/daton.ts'
|
||||
const { env, ViewEngine } = Daton
|
||||
|
||||
export default {
|
||||
name: env('APP_NAME', 'Daton'),
|
||||
|
||||
views: {
|
||||
/*
|
||||
* View engine that should be used to render templates.
|
||||
* Options are Handlebars, Ejs, or Denjuck.
|
||||
*/
|
||||
engine: ViewEngine.Handlebars,
|
||||
|
||||
/*
|
||||
* Relative path from the app directory to the base directory where
|
||||
* view files should be looked up.
|
||||
*/
|
||||
base_dir: 'http/views',
|
||||
|
||||
/*
|
||||
* If using Handlebars, optionally, the path to the directory within the
|
||||
* base_dir that contains the partials. They will be automatically registered
|
||||
* with Handlebars.
|
||||
*/
|
||||
partials_dir: 'partials',
|
||||
},
|
||||
}
|
||||
17
app/configs/db.config.ts
Normal file
17
app/configs/db.config.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Daton } from '../../bundle/daton.ts'
|
||||
const { env } = Daton
|
||||
|
||||
export default {
|
||||
|
||||
connections: {
|
||||
default: {
|
||||
type: env('DB_TYPE', 'postgres'),
|
||||
user: env('DB_USERNAME', 'daton'),
|
||||
password: env('DB_PASSWORD'),
|
||||
database: env('DB_DATABASE', 'daton'),
|
||||
hostname: env('DB_HOSTNAME', 'localhost'),
|
||||
port: env('DB_PORT', 5432),
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
18
app/configs/server.config.ts
Normal file
18
app/configs/server.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export default {
|
||||
port: 8080,
|
||||
use_ssl: false,
|
||||
prefix: '/',
|
||||
allow_mount_without_prefix: false,
|
||||
|
||||
request_timeout: 15000, // 15 seconds
|
||||
|
||||
powered_by: {
|
||||
enable: true,
|
||||
text: 'Daton',
|
||||
},
|
||||
|
||||
session: {
|
||||
driver: 'database', // memory | database
|
||||
model: 'http:Session', // required for database
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user