@dnax/core 0.6.5 → 0.7.0

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.
Files changed (2) hide show
  1. package/app/index.ts +4 -3
  2. package/package.json +1 -1
package/app/index.ts CHANGED
@@ -18,10 +18,8 @@ type configRunApp = {
18
18
  };
19
19
  async function runApp(config?: configRunApp, clb?: Function) {
20
20
  hookDatabase.cb = config?.dbSync || [];
21
- // Load all ressouce
22
- await init();
23
21
  await loadCfg(); // Load Config
24
- const HonoApp = HonoInstance();
22
+
25
23
  const PORT = Cfg.server?.port || process.env?.PORT || 4000;
26
24
  const PORT_SOCKET = Cfg.server?.socket?.port || 9000;
27
25
 
@@ -38,6 +36,9 @@ async function runApp(config?: configRunApp, clb?: Function) {
38
36
  await findPort.isAvailable(PORT).then(async (available: boolean) => {
39
37
  // Start App server
40
38
  if (available) {
39
+ // Load all ressouce
40
+ await init();
41
+ const HonoApp = HonoInstance();
41
42
  //BeforeStart
42
43
  if (config?.beforeStart) {
43
44
  for (const fn of config?.beforeStart) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.6.5",
3
+ "version": "0.7.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {