@dkaframework/server
v1.2.22
Published
The Multi Framework Server Function. Part Module Of DKAFramework
Downloads
25
Maintainers
Readme
@dkaframework/server
Features
@dkaframework/server combines other frameworks into a framework and can be used practically to create your project. It consists of:
- a Fastify - Fast and low overhead web framework, for Node.js
- a Socket.io - real-time bidirectional event-based communication
- a Node:dgram - UDP Server - an udp core udp protocol send files
Simple and convenient API
Sample code:
import {Server, Options} from "@dkaframework/server";
(async() => {
await Server({
engine: Options.ENGINE.FASTIFY, // Options.ENGINE.SOCKETIO || Options.ENGINE.UDP,
host: Options.HOST.LOCALHOST, // Options.HOST.WILDCARD
port: Options.PORT.DEFAULT,
... // Optional Config if you change engine type
}).then(async (serverCallback) => {
console.log(serverCallback)
}).catch(async (error) => {
console.error(error)
});
})()