@jb_fmanager/express
v1.1.0
Published
jb file manager endpoint setup for express
Downloads
1
Readme
npm i @jb_fmanager/express @jb_fmanager/node-utils
yarn add @jb_fmanager/express @jb_fmanager/node-utils
const server = require("express");
const app = server();
const cors = require("cors");
const bodyParser = require("body-parser");
const path = require("path");
require("@jb_fmanager/express")(app, {
root: "public",
prefix: "/api/fm",
errorHandler: undefined,
});
app.use(cors());
app.use(server.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(server.static("./public"));
app.listen(4000, () => console.log("listening on port 4000"));