feat: Refactor TypedServer to use SmartServe and introduce new request handlers
- Removed legacy servertools and Express dependencies in favor of SmartServe. - Introduced DevToolsHandler and TypedRequestHandler for handling specific routes. - Added support for custom route registration with regex parsing. - Implemented sitemap and feed handling with dedicated helper classes. - Enhanced HTML response handling with reload script injection. - Updated UtilityServiceServer and UtilityWebsiteServer to utilize new TypedServer API. - Removed deprecated compression options and Express-based route handling. - Added comprehensive request handling for various endpoints including robots.txt, manifest.json, and sitemap. - Improved error handling and response formatting across the server.
This commit is contained in:
@@ -61,11 +61,16 @@ export {
|
||||
// Create a ready-to-use smartfs instance with Node.js provider
|
||||
export const fsInstance = new smartfs.SmartFs(new smartfs.SmartFsProviderNode());
|
||||
|
||||
// express
|
||||
// @push.rocks/smartserve
|
||||
import * as smartserve from '@push.rocks/smartserve';
|
||||
|
||||
export { smartserve };
|
||||
|
||||
// Legacy Express dependencies - kept for backward compatibility with deprecated servertools
|
||||
// These will be removed in the next major version
|
||||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import cors from 'cors';
|
||||
import express from 'express';
|
||||
// @ts-ignore
|
||||
import expressForceSsl from 'express-force-ssl';
|
||||
|
||||
export { bodyParser, cors, express, expressForceSsl };
|
||||
export { express, bodyParser, cors, expressForceSsl };
|
||||
|
||||
Reference in New Issue
Block a user