spa-ssi 0.0.1 → 0.0.2
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 +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,31 @@
|
|
|
1
1
|
# spa-ssi
|
|
2
|
+
|
|
2
3
|
Single Page App / Server Side Include Simple File Web Server
|
|
4
|
+
|
|
5
|
+
## To run
|
|
6
|
+
|
|
7
|
+
1. Install node.js
|
|
8
|
+
2. From a terminal, run:
|
|
9
|
+
> node serve.js
|
|
10
|
+
3. From another package:
|
|
11
|
+
> npm install spa-ssi
|
|
12
|
+
> node ./node_modules/spa-ssi/serve.js
|
|
13
|
+
|
|
14
|
+
## Support for server-side includes:
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<!doctype html>
|
|
18
|
+
<html>
|
|
19
|
+
<head>
|
|
20
|
+
<title>ssi_server demo</title>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<!--#include virtual="about.html"-->
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Support for SPA
|
|
29
|
+
|
|
30
|
+
If a page request doesn't resolve to a file, it defaults to /index.html
|
|
31
|
+
|