@gjsify/example-node-express-webserver 0.4.43 → 0.4.44
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 +32 -0
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @gjsify/example-node-express-webserver
|
|
2
|
+
|
|
3
|
+
An Express 5 blog showcase — JSON API + static frontend — running on GJS using gjsify's Node.js polyfills (`@gjsify/http`, etc.). The same source also builds for Node.js, demonstrating that a real Express web application runs unmodified on GJS via the `@gjsify/*` Node API layer.
|
|
4
|
+
|
|
5
|
+
Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and Web APIs for GJS (GNOME JavaScript).
|
|
6
|
+
|
|
7
|
+
## Run
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Build first
|
|
11
|
+
gjsify run build
|
|
12
|
+
|
|
13
|
+
# GJS (Express over GJS + Soup HTTP)
|
|
14
|
+
gjsify showcase express-webserver
|
|
15
|
+
# or: gjsify run start
|
|
16
|
+
|
|
17
|
+
# Node.js (for comparison)
|
|
18
|
+
gjsify run start:node
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Then open `http://localhost:3000` in a browser.
|
|
22
|
+
|
|
23
|
+
## What it demonstrates
|
|
24
|
+
|
|
25
|
+
- Express 5 running on GJS with gjsify's `@gjsify/http` (Soup 3.0 backend)
|
|
26
|
+
- JSON REST API + static file serving from a single Express app
|
|
27
|
+
- Same source building for both `--app gjs` and `--app node` targets
|
|
28
|
+
- Node.js polyfill layer compatibility with an unmodified npm package
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/example-node-express-webserver",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.44",
|
|
4
4
|
"description": "Express.js blog showcase with JSON API and static frontend — a real Node.js web app running on GJS",
|
|
5
5
|
"main": "dist/index.gjs.js",
|
|
6
6
|
"type": "module",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"build:public": "mkdir -p dist/public && cp -r src/public/* dist/public/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@gjsify/http-soup-bridge": "^0.4.
|
|
24
|
+
"@gjsify/http-soup-bridge": "^0.4.44"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@gjsify/cli": "^0.4.
|
|
28
|
-
"@gjsify/node-globals": "^0.4.
|
|
29
|
-
"@gjsify/runtime": "^0.4.
|
|
27
|
+
"@gjsify/cli": "^0.4.44",
|
|
28
|
+
"@gjsify/node-globals": "^0.4.44",
|
|
29
|
+
"@gjsify/runtime": "^0.4.44",
|
|
30
30
|
"@types/express": "^5.0.6",
|
|
31
31
|
"@types/node": "^25.9.1",
|
|
32
32
|
"express": "^5.2.1",
|