React Engine Framework for Express
npm install the-ref-framework> NOTE: This framework is not ready for production and for now, is just a Proof of Concept. Soon it will be ready for production
Features:
- Server-side rendering
import express from "express";
import RenderEngine from "the-ref-framework";
import path from "path";const app = express();
const PORT = 3000;
const viewsFolderPath: string = __dirname + "/views";
new RenderEngine({
viewsPath: viewsFolderPath,
errorMessage: "An error happened while loading this page.",
jsxOrTsx: "TypeScript XML",
expressApp: app,
});
app.get("/", function (req, res) {
res.render("root");
});
app.listen(PORT, () => console.log(
Server listening on port: ${PORT}));
``