@fuzionx/framework 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,6 @@
1
1
  import { Application } from '@fuzionx/framework';
2
- import webRoutes from './routes/web.js';
3
- import apiRoutes from './routes/api.js';
4
2
 
5
3
  const app = new Application({ configPath: './fuzionx.yaml' });
6
4
 
7
- app.routes(webRoutes);
8
- app.routes(apiRoutes);
9
-
10
5
  await app.boot();
11
-
12
- app.listen(49080, () => {
13
- console.log('🚀 FuzionX running on http://localhost:49080');
14
- });
6
+ await app.listen();
@@ -8,6 +8,6 @@ export default class HomeController extends Controller {
8
8
 
9
9
  /** 홈 페이지 */
10
10
  async index(ctx) {
11
- ctx.render('pages/home');
11
+ ctx.render('home');
12
12
  }
13
13
  }
@@ -1,13 +1,38 @@
1
1
  # FuzionX Configuration
2
2
  bridge:
3
3
  port: 49080
4
- workers: 4
4
+ workers: 0
5
5
  worker_timeout: 30
6
6
 
7
+ cors:
8
+ enabled: false
9
+ origins:
10
+ - "*"
11
+
7
12
  rate_limit:
8
13
  enabled: true
9
14
  per_ip: 1000
10
15
 
16
+ session:
17
+ enabled: false
18
+ store: memory
19
+ ttl: 3600
20
+ cookie_name: fuzionx.sid
21
+
22
+ websocket:
23
+ enabled: false
24
+ path: /ws
25
+ check_interval: 60
26
+ timeout: 60
27
+
28
+ static:
29
+ - url: /public
30
+ path: ./public
31
+
32
+ logging:
33
+ level: info
34
+ intercept_console: true
35
+
11
36
  database:
12
37
  default: main
13
38
  connections:
@@ -18,15 +43,18 @@ database:
18
43
  app:
19
44
  name: '{{name}}'
20
45
  environment: development
46
+
21
47
  auth:
22
- secret: 'change-me-in-production'
48
+ secret: '${JWT_SECRET:change-me-in-production}'
23
49
  accessTtl: '15m'
50
+
24
51
  i18n:
25
52
  default_locale: 'ko'
26
53
  fallback: 'en'
54
+
27
55
  docs:
28
56
  enabled: true
29
57
  path: '/docs'
30
58
 
31
- themes:
32
- default: 'default'
59
+ themes:
60
+ default: 'default'
@@ -1,5 +1,5 @@
1
+ import HomeController from '../controllers/HomeController.js';
2
+
1
3
  export default (r) => {
2
- r.get('/', (ctx) => {
3
- ctx.render('home');
4
- });
4
+ r.get('/', HomeController.index);
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import { Middleware } from '@fuzionx/framework';
2
2
 
3
3
  export default class {{Name}}Middleware extends Middleware {
4
- static name = '{{nameLower}}';
4
+ static alias = '{{nameLower}}';
5
5
 
6
6
  async handle(ctx, next) {
7
7
  // TODO: implement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzionx/framework",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "type": "module",
5
5
  "description": "Full-stack MVC framework built on @fuzionx/core — Controller, Service, Model, Middleware, DI, EventBus",
6
6
  "main": "index.js",
@@ -34,7 +34,7 @@
34
34
  "url": "https://github.com/saytohenry/fuzionx"
35
35
  },
36
36
  "dependencies": {
37
- "@fuzionx/core": "^0.1.22",
37
+ "@fuzionx/core": "^0.1.23",
38
38
  "better-sqlite3": "^12.8.0",
39
39
  "knex": "^3.2.5",
40
40
  "mongoose": "^9.3.2",