- rename 'prefixes' folder to 'assets'
This commit is contained in:
parent
83685b68ed
commit
b754f02210
8 changed files with 10 additions and 11 deletions
|
@ -14,7 +14,7 @@ export class App extends Server {
|
|||
constructor() {
|
||||
super();
|
||||
// this.app = express();
|
||||
this.app.use('/prefixes', express.static(path.join(__dirname, '../prefixes')));
|
||||
this.app.use('/assets', express.static(path.join(__dirname, '../assets')));
|
||||
this.applyMiddleWares();
|
||||
// init db and add routes
|
||||
this.boostrap();
|
||||
|
@ -60,7 +60,7 @@ export class App extends Server {
|
|||
this.app.use("/api/", HomeRoutes);
|
||||
this.app.get("/", (request, response) => {
|
||||
// response.send('Hello World, from express');
|
||||
response.sendFile("/home/administrator/api/new-book.html");
|
||||
response.sendFile("/home/administrator/tethys.api/new-book.html");
|
||||
});
|
||||
|
||||
// Error handling middleware
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -30,14 +30,13 @@ export class FileController {
|
|||
"Content-Transfer-Encoding": "binary",
|
||||
});
|
||||
res.status(StatusCodes.OK).sendFile(filePath);
|
||||
} catch (err) {
|
||||
} catch (err) {
|
||||
// console.log("no access:", path);
|
||||
res.status(StatusCodes.NOT_FOUND).send({
|
||||
message: `File with id ${id} doesn't exist on file server`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// res.status(StatusCodes.OK).sendFile(filePath, (err) => {
|
||||
// // res.setHeader("Content-Type", "application/json");
|
||||
// // res.removeHeader("Content-Disposition");
|
||||
|
|
|
@ -7,7 +7,7 @@ import { XMLBuilder } from "xmlbuilder2/lib/interfaces";
|
|||
import { readFileSync } from "fs";
|
||||
// @ts-ignore
|
||||
import { transform } from "saxon-js";
|
||||
import dayjs, { Dayjs, OpUnitType } from "dayjs";
|
||||
import dayjs, { Dayjs } from "dayjs";
|
||||
import { Dataset, Project, License } from "../models/init-models";
|
||||
import Logger from "jet-logger";
|
||||
import { BadOaiModelException, OaiModelException } from "../exceptions/OaiModelException";
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue