create-kda
Advanced tools
Comparing version 0.0.36 to 0.0.37
{ | ||
"name": "create-kda", | ||
"version": "0.0.36", | ||
"version": "0.0.37", | ||
"main": "index.mjs", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/kdajs/create-kda.git", |
@@ -12,4 +12,10 @@ export const enum NODE_ENV { | ||
NODE_ENV: NODE_ENV | ||
DB_HOST: string | ||
DB_PORT: string | ||
DB_USERNAME: string | ||
DB_PASSWORD: string | ||
DB_DATABASE: string | ||
SERVER_PORT: string | ||
} | ||
} | ||
} |
import 'kda' | ||
// import models from '@/models' | ||
import utils from '@/utils' | ||
import clients from '@/clients' | ||
// import clients from '@/clients' | ||
@@ -10,3 +10,3 @@ declare module 'kda' { | ||
utils: typeof utils | ||
clients: typeof clients | ||
// clients: typeof clients | ||
} | ||
@@ -13,0 +13,0 @@ |
@@ -7,2 +7,2 @@ import '@/router' | ||
createServer({ utils, clients }).start(3000) | ||
createServer({ utils, clients }).start(parseInt(process.env.SERVER_PORT)) |
import { createModels } from 'kda' | ||
import config from '@/config' | ||
import User from '@/models/user' | ||
export default await createModels({ | ||
...config.DB, | ||
host: process.env.DB_HOST, | ||
username: process.env.DB_USERNAME, | ||
password: process.env.DB_PASSWORD, | ||
port: parseInt(process.env.DB_PORT), | ||
database: process.env.DB_DATABASE, | ||
entities: { | ||
@@ -8,0 +11,0 @@ User |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22722
27
234