Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

jsx-engine

Maintainability Test Coverage FOSSA Status

Install

yarn add jsx-engine

Usage

// server.js
const express = require('express')
const app = express()
app.engine('jsx', require('jsx-engine'))
app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'jsx')
app.get('/', (req, res) => {
  res.render('index')
});
// views/index.js
module.exports = () => {
  return (
    <html lang='en'>
      <head>
        <title>jsx-engine</title>
      </head>
      <body>
        <div>Hey!</div>
      </body>
    </html>
  );
}

License

FOSSA Status