Comments (3)
Thanks for your work! I will start and keep improving this repo later
from node-ssi.
I went ahead and created it for okturtles.com.
It runs great! Thanks so much for this library! π π
from node-ssi.
Another example for serving files using grunt-contrib-connect
:
connect: { // https://github.com/gruntjs/grunt-contrib-connect
options: {
port: 8000,
base: 'dist',
livereload: true,
middleware: (connect, opts, middlewares) => {
middlewares.unshift((req, res, next) => {
var f = url.parse(req.url).pathname
f = path.join('dist', S(f).endsWith('/') ? f + 'index.html' : f)
// grunt.log.writeln(`request for: ${req.url}`)
if (S(f).endsWith('.html') && fs.existsSync(f)) {
ssi.compileFile(f, (err, content) => {
if (err) {
console.error(err.stack)
throw err
}
console.log(`Req: ${req.url} => sending node-ssi parsed file: ${f}`)
res.end(content)
})
} else {
next()
}
})
return middlewares
}
},
dev: {}
}
from node-ssi.
Related Issues (11)
- "virtual" should specifies the target relative to the domain root HOT 9
- θ½δΈθ½ζ·»ε εζ°δΌ ιηεθ½ HOT 1
- Cool project!
- Feature request: Continue SSI processing if failure to resolve an include occurs with ssi.compile and ssi.compileFile HOT 1
- ζ―ε¦ζ―ζ#config
- Single line incrrect HOT 1
- npm WARN enoent ENOENT: no such file or directory, open '/home/mynodeproject/www/package.json'
- Support for multiple directories
- Support for expr=$QUERY_STRING and $REQUEST_URI
- Using `=` with a variable in an `#if` statement causes the variable's value to change
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ssi.