npm.io
1.0.2 • Published 6 years ago

express-get

Licence
ISC
Version
1.0.2
Deps
0
Size
1 kB
Vulns
0
Weekly
0

what is this?

Render ejs and html files in one step.

Installation

npm i express-get

Then...

const express = require("express");
const ejs = require("ejs")
const route = require("express-get()")
const app = express()


route.get("/","index",app)

options

For rendering ejs file send the name of the file, And for an html file send the fileName with extension

  • route.get("/","index",app) - _ejs
  • route.get("/","index.html,app") - _htmlFile

Keywords