create-kda
Advanced tools
Comparing version 0.0.12 to 0.0.13
{ | ||
"name": "create-kda", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/kdajs/create-kda.git", |
@@ -0,3 +1,3 @@ | ||
import './router' | ||
// import models from './models' | ||
import router from './router' | ||
import utils from './utils' | ||
@@ -7,4 +7,3 @@ import clients from './clients' | ||
const store = createStore({ utils }) | ||
createServer({ store, router }).start(3000, clients) | ||
createStore({ utils }) | ||
createServer().start(3000, clients) |
@@ -1,7 +0,7 @@ | ||
import { Controller } from 'kda' | ||
import { createController } from 'kda' | ||
const Hello: Controller = async ctx => { | ||
const Hello = createController(async ctx => { | ||
ctx.body = `${ctx.store.utils.now()} - Hello, KDA!` | ||
} | ||
}) | ||
export default Hello |
@@ -1,5 +0,5 @@ | ||
import { UDPSocketController } from 'kda' | ||
import { createUDPSocketController } from 'kda' | ||
export const Test: UDPSocketController = (state, params, callbackComplete, callbackError) => { | ||
export const Test = createUDPSocketController((store, params, resolve, reject) => { | ||
// ... | ||
} | ||
}) |
@@ -1,7 +0,7 @@ | ||
import { Controller } from 'kda' | ||
import { createController } from 'kda' | ||
const Upload: Controller = async ctx => { | ||
const Upload = createController(async ctx => { | ||
ctx.body = ctx.request.file | ||
} | ||
}) | ||
export default Upload |
@@ -12,3 +12,1 @@ import { createRouter, createUploadController } from 'kda' | ||
router.udp('/udp/test', Test) | ||
export default router |
22147
233