@meghjs/cli 0.5.4 → 0.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meghjs/cli",
3
- "version": "0.5.4",
3
+ "version": "0.6.0",
4
4
  "description": "CLI for scaffolding and running Megh applications",
5
5
  "author": "Tareq Hossain",
6
6
  "license": "MIT",
@@ -52,7 +52,7 @@
52
52
  "vitest": "^4.1.12"
53
53
  },
54
54
  "peerDependencies": {
55
- "@meghjs/core": "^0.5.4"
55
+ "@meghjs/core": "^0.6.0"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@meghjs/core": {
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "25ab107490492cc54d1eb3419a33b735613c57ab"
74
+ "gitHead": "456b604c95c5aafcb9beabc46b3cc16946fa2176"
75
75
  }
@@ -1,3 +1,4 @@
1
- # Core treats an unset NODE_ENV as production.
2
- NODE_ENV=development
1
+ # NODE_ENV is left unset on purpose: `megh serve` runs the app in development
2
+ # and `megh start` in production. Core treats an unset NODE_ENV as production,
3
+ # so a copied .env never turns on development mode by accident.
3
4
  PORT=4000
@@ -1,10 +1,4 @@
1
- import { Environment, inject } from '@meghjs/core';
2
1
  import app from './app';
3
2
 
4
- async function serve() {
5
- const env = inject(Environment);
6
- const port = Number(env.get('PORT')) || 4000;
7
- await app.run(port);
8
- }
9
-
10
- serve();
3
+ // Listens on PORT (default 4000) and HOST (default 0.0.0.0) from the environment.
4
+ app.run();