rprcli
Version:
Reaper.js is a powerful TypeScript-based framework designed to streamline backend development. It offers built-in database migrations, seeders, and SQL query utilities, making it easy to manage data efficiently. With native support for TSX and JSX renderi
14 lines (13 loc) • 528 B
JavaScript
const express = require("express");
const path = require("path");
const app = express();
const loadRoutes = require("reaperjs/server/lib/loadRoutes");
app.set("view engine", "ejs");
app.set("views", path.join(__dirname, "views"));
app.use("/__reaper_generated",express.static(path.join(process.cwd(), ".reaper/out/templates")));
app.use(express.static(path.join(__dirname, "./public")));
app.use(express.static(path.join(process.cwd(), "public")));
module.exports = (APP)=>{
app.use(loadRoutes(APP));
return app;
};