Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added fastify server support #11

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

added fastify server support #11

wants to merge 11 commits into from

Conversation

SerVitasik
Copy link
Contributor

No description provided.

Copy link
Contributor

@ivictbor ivictbor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SerVitasik great speed 💪, let's move common html snippet to file genericServer.ts both express server and fastify should extend the class from this file

@@ -101,7 +59,7 @@ class ExpressServer implements IExpressHttpServer {
await proxyTo(`http://localhost:5173${req.url}`, res);
} catch (e) {
// console.log('Failed to proxy', e);
res.status(500).send(respondNoServer('AdminForth SPA is not ready yet', 'Vite is still starting up. Please wait a moment...'));
res.status(500).send(this.respondNoServer('AdminForth SPA is not ready yet', 'Vite is still starting up. Please wait a moment...'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SerVitasik I think the string literals should be moved as well.

@@ -134,7 +92,7 @@ class ExpressServer implements IExpressHttpServer {
fileExists = false;
}
if (!fileExists) {
res.status(500).send(respondNoServer(`${this.adminforth.config.customization.brandName} is still warming up`, 'Please wait a moment...'));
res.status(500).send(this.respondNoServer(`${this.adminforth.config.customization.brandName} is still warming up`, 'Please wait a moment...'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants