4.1.0 • Published 2 years ago
@phenyl/http-server v4.1.0
@phenyl/http-server
Simple HTTP Server to host PhenylRestApi
example
To create a PhenylHttpServer instance, you need to create a PhenylRestApi instance.
import { createServer } from "http";
import PhenylHttpServer from "@phenyl/http-server";
import PhenylRestApi from "@phenyl/rest-api";
import { createEntityClient } from "@phenyl/memory-db";
const entityClient = createEntityClient();
class NonUserDefinition {
constructor() {}
}
const functionalGroup = {
nonUsers: { nonUser: new NonUserDefinition() },
users: undefined,
customQueries: undefined,
customCommands: undefined,
};
const restApiHandler = new PhenylRestApi(functionalGroup, {
entityClient,
sessionClient: entityClient.createSessionClient(),
});
const server = new PhenylHttpServer(createServer(), { restApiHandler });
server.listen(8080)
4.1.0
2 years ago
4.0.3
3 years ago
4.0.2
3 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.0.0
4 years ago
2.1.0
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
1.2.0
4 years ago
2.0.0
4 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
1.0.0-alpha.18
5 years ago
1.0.0-alpha.17
5 years ago
1.0.0-alpha.16
5 years ago
1.0.0-alpha.15
5 years ago
1.0.0-alpha.14
5 years ago
1.0.0-alpha.8
5 years ago
1.0.0-alpha.7
5 years ago
1.0.0-alpha.6
5 years ago
1.0.0-alpha.5
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.1
5 years ago