@flow.os/server 0.0.1-dev.1771780350 → 0.0.1-dev.1771781977
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/README.md +12 -0
- package/package.json +2 -2
- package/scripts/start.ts +11 -0
- package/start.ts +0 -15
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @flow.os/server
|
|
2
|
+
|
|
3
|
+
Server Flow.os: API native Request/Response, plugin Vite, avvio dev/prod.
|
|
4
|
+
|
|
5
|
+
## API (`index.ts`)
|
|
6
|
+
|
|
7
|
+
- `flowServer`, `FlowRequest`, `FlowHandler`, `defineHandler`.
|
|
8
|
+
- Subpath: `@flow.os/server/vite` (plugin), `@flow.os/server/production` (serve static + API).
|
|
9
|
+
|
|
10
|
+
## Bin
|
|
11
|
+
|
|
12
|
+
- `server` — avvia dev (con Vite) o produzione.
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/server",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1771781977",
|
|
4
4
|
"license": "PolyForm-Shield-1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
7
7
|
"types": "./index.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"server": "./start.ts"
|
|
9
|
+
"server": "./scripts/start.ts"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"peerDependencies": {
|
package/scripts/start.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/** Entry produzione: statici + API. Uso: bunx @flow.os/server */
|
|
3
|
+
import { runProductionServer } from '../production.js';
|
|
4
|
+
|
|
5
|
+
const port = process.env['PORT'] ? Number(process.env['PORT']) : 3000;
|
|
6
|
+
runProductionServer({
|
|
7
|
+
routesDir: 'server/routes',
|
|
8
|
+
staticDir: 'dist',
|
|
9
|
+
port,
|
|
10
|
+
hostname: '0.0.0.0',
|
|
11
|
+
});
|
package/start.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* Entry produzione: lancia il server (statici + API).
|
|
4
|
-
* Uso: bunx @flow.os/server oppure "start": "bunx @flow.os/server" in package.json.
|
|
5
|
-
*/
|
|
6
|
-
import { runProductionServer } from './production.js';
|
|
7
|
-
|
|
8
|
-
const port = process.env['PORT'] ? Number(process.env['PORT']) : 3000;
|
|
9
|
-
|
|
10
|
-
runProductionServer({
|
|
11
|
-
routesDir: 'server/routes',
|
|
12
|
-
staticDir: 'dist',
|
|
13
|
-
port,
|
|
14
|
-
hostname: '0.0.0.0',
|
|
15
|
-
});
|