1.6.0 ā¢ Published 11 months ago
rjweb-server-ejs v1.6.0
Install
npm i rjweb-server-ejs
or
yarn add rjweb-server-ejs
or
pnpm add rjweb-server-ejs
Usage
Rendering a File & Setup
const { Server } = require('rjweb-server')
const { eJS } = require('rjweb-server-ejs')
const server = new Server({
port: 8000
}, [
eJS.config({})
])
server.path('/', (path) => path
.http('GET', '/', (http) => http
.onRequest((ctr) => {
ctr.printEJS('./index.ejs')
})
)
)
server.start().then((res) => {
console.log(`Server started on port ${res.port}`)
})
Author
š¤ 0x4096
Show your support
Give a Star if this project helped you!
š License
Copyright Ā© 2023 0x4096. This project is MIT licensed.