https://github.com/kunyan/server-side-include
The middleware of express to support SSI
https://github.com/kunyan/server-side-include
Last synced: about 1 month ago
JSON representation
The middleware of express to support SSI
- Host: GitHub
- URL: https://github.com/kunyan/server-side-include
- Owner: kunyan
- License: mit
- Created: 2020-06-05T10:45:07.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-21T17:30:21.000Z (about 2 months ago)
- Last Synced: 2025-04-25T03:15:10.567Z (about 2 months ago)
- Language: TypeScript
- Size: 980 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Server Side Include
[](https://github.com/kunyan/server-side-include/actions)
[](https://www.npmjs.com/package/@server-side-include/core)
[](https://www.npmjs.com/package/@server-side-include/express-middleware)
[](https://www.npmjs.com/package/@server-side-include/vite-plugin)## Concept
Implement [Server Side Includes](https://httpd.apache.org/docs/current/howto/ssi.htm) with Node.js
## Integration
### Express
```js
import { serverSideInclude } from '@server-side-include/express-middleware';
import express from 'express';app.use(serverSideInclude());
app.use(express.static('public'));
app.listen(3000);
```### Vite
```js
import { SSIPlugin } from '@server-side-include/vite-plugin';
import path from 'path';
import { defineConfig } from 'vite';export default defineConfig({
plugins: [
SSIPlugin({
host: 'https://access.redhat.com',
rejectUnauthorized: true,
templatePath: path.resolve(__dirname, 'index.html'),
}),
],
});
``````html
Hello world
```