1.0.1 • Published 2 years ago
static-ejs v1.0.1
static-ejs
usage :
//derectory of static server,extra variabals
function staticEjs(dir = __dirname+'/static',variabals = {}){}
var staticEjs = require('static-ejs')
var express = require('express')
var app = express()
app.use(staticEjs(__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".