@atria/server 0.0.3 → 0.0.4

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/README.md +33 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @atria/server
2
+
3
+ HTTP runtime server for atria development.
4
+
5
+ This package serves files from `.atria/runtime` and powers the `atria dev` command in local development.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @atria/server @atria/shared
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { startDevServer } from "@atria/server";
17
+
18
+ const server = await startDevServer({
19
+ projectRoot: process.cwd(),
20
+ port: 3333
21
+ });
22
+
23
+ console.log(server.url);
24
+ // later:
25
+ await server.close();
26
+ ```
27
+
28
+ ## Behavior
29
+
30
+ - Serves static files from `<projectRoot>/.atria/runtime`.
31
+ - Responds to `GET /api/health` with `{ "ok": true }`.
32
+ - Falls back to `index.html` for non-file routes.
33
+ - Blocks path traversal attempts outside runtime directory.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atria/server",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "HTTP server and runtime delivery for atria",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@atria/shared": "0.0.3"
19
+ "@atria/shared": "0.0.4"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public"