Moved from CJS to ESM + small improvements like logging
This commit is contained in:
parent
61df35a271
commit
c57160e05d
16 changed files with 512 additions and 488 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { BaseController } from '../controllers/BaseController';
|
||||
import { BaseController } from '../controllers/BaseController.js';
|
||||
|
||||
export const CHILD_CONTROLLER_METADATA_KEY = 'ChildController';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Application, Request, Response, NextFunction } from 'express';
|
||||
|
||||
import { BaseController } from '../controllers/BaseController';
|
||||
import { BaseController } from '../controllers/BaseController.js';
|
||||
|
||||
import { CHILD_CONTROLLER_METADATA_KEY } from './ChildController';
|
||||
import { GET_METADATA_KEY } from './GET';
|
||||
import { POST_METADATA_KEY } from './POST';
|
||||
import { PUT_METADATA_KEY } from './PUT';
|
||||
import { DELETE_METADATA_KEY } from './DELETE';
|
||||
import { CHILD_CONTROLLER_METADATA_KEY } from './ChildController.js';
|
||||
import { GET_METADATA_KEY } from './GET.js';
|
||||
import { POST_METADATA_KEY } from './POST.js';
|
||||
import { PUT_METADATA_KEY } from './PUT.js';
|
||||
import { DELETE_METADATA_KEY } from './DELETE.js';
|
||||
|
||||
/**
|
||||
* Class decorator to "fill in" the setup method which is called on server startup and connects the methods/functions and their desired paths in the express app.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Request, Response, NextFunction } from 'express';
|
||||
|
||||
import { ErrorController } from '../controllers/ErrorController';
|
||||
import { ErrorController } from '../controllers/ErrorController.js';
|
||||
|
||||
/**
|
||||
* Class decorator to create custom error handling for the app.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { Controller } from './Controller';
|
||||
import { ChildController } from './ChildController';
|
||||
import { Page } from './Page';
|
||||
import { GET } from './GET';
|
||||
import { POST } from './POST';
|
||||
import { PUT } from './PUT';
|
||||
import { DELETE } from './DELETE';
|
||||
import { ErrorHandler } from './ErrorHandler';
|
||||
import { Controller } from './Controller.js';
|
||||
import { ChildController } from './ChildController.js';
|
||||
import { Page } from './Page.js';
|
||||
import { GET } from './GET.js';
|
||||
import { POST } from './POST.js';
|
||||
import { PUT } from './PUT.js';
|
||||
import { DELETE } from './DELETE.js';
|
||||
import { ErrorHandler } from './ErrorHandler.js';
|
||||
|
||||
export {
|
||||
Controller,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue