1.0.1 • Published 2 years ago
express-static-ejs v1.0.1
express-static-ejs
usage :
//derectory of static server,extra variabals
function expressStaticEjs(dir = __dirname+'/static',variabals = {}){}
var expressStaticEjs = require('express-static-ejs')
var express = require('express')
var app = express()
app.use(expressStaticEjs(__dirname+'/test'))
app.listen(8080)
variables request and response will be available in ejs scripts to handle the incoming request and response.
all non ejs files under directory will be handled with "response.sendFile".