Skip to content

Releases: arnelify/arnelify-server-node

v1.0.8

09 Apr 12:38

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
RATE_LIMIT Defines the maximum number of connections allowed from a single IP address.
READ_TIMEOUT Maximum time allowed for a client to send a request to the server.
SEND_TIMEOUT Maximum time allowed for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    rate_limit: 5,
    read_timeout: 30,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    ...
Read more

v1.0.7

08 Apr 21:46

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
RATE_LIMIT Defines the maximum number of connections allowed from a single IP address.
READ_TIMEOUT Maximum time allowed for a client to send a request to the server.
SEND_TIMEOUT Maximum time allowed for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    rate_limit: 5,
    read_timeout: 30,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    ...
Read more

v1.0.5

29 Mar 19:35

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    threa...
Read more

v1.0.4

26 Mar 14:58

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    threa...
Read more

v1.0.3

25 Mar 21:59

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    threa...
Read more

v1.0.0

24 Mar 23:58

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    threa...
Read more

v0.9.8

23 Mar 02:16

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP2 WebTransport
2 TCP2 HTTP 3.0
3 TCP1 WebSocket
4 TCP1 HTTP 2.0
5 TCP1 HTTP 1.1

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_ALIVE defines how long the HTTP server keeps a connection.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    threa...
Read more

v0.9.7

20 Mar 23:06

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP1 HTTP 1.1
2 TCP1 HTTP 2.0
3 TCP1 WebSocket
4 TCP2 HTTP 3.0
5 TCP2 WebTransport

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    await stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http2: Http2 = new Http2(http2_opts);
  http2.logger(async (_level: string, message: string): Promise<void> => {
    c...
Read more

v0.9.6

20 Mar 14:59

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for NodeJS — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP1 HTTP 1.1
2 TCP1 HTTP 2.0
3 TCP1 WebSocket
4 TCP2 HTTP 3.0
5 TCP2 WebTransport

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebTransportServer,
  WebTransportOpts,
  WebTransportBytes,
  WebTransportCtx,
  WebTransportStream
} from "arnelify-server";

(async function main() {

  const wt_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: false,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const wt: WebTransportServer = new WebTransportServer(wt_opts);
  wt.logger(async (level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  wt.on("connect", async (
    ctx: WebTransportCtx,
    bytes: WebTransportBytes,
    stream: WebTransportStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await wt.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http3, 
  Http3Opts, 
  Http3Ctx, 
  Http3Stream
} from "arnelify-server";

(async function main() {

  const http3_opts: Http3Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http3: Http3 = new Http3(http3_opts);
  http3.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  http3.on("/", async (ctx: Http3Ctx, stream: Http3Stream): Promise<void> => {
    const bytes: Buffer = Buffer.from(JSON.stringify(ctx));
    stream.set_code(200);
    await stream.push_bytes(bytes, false);
    await stream.end();
  });

  await http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import {
  WebSocketServer,
  WebSocketOpts,
  WebSocketBytes,
  WebSocketCtx,
  WebSocketStream
} from "arnelify-server";

(async function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: false,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 15,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws: WebSocketServer = new WebSocketServer(ws_opts);
  ws.logger(async (_level: string, message: string): Promise<void> => {
    console.log(`[Arnelify Server]: ${message}`);
  });

  ws.on("connect", async (
    ctx: WebSocketCtx,
    bytes: WebSocketBytes,
    stream: WebSocketStream
  ): Promise<void> => {
    await stream.push(ctx, bytes);
    await stream.close();
  });

  await ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { 
  Http2, 
  Http2Opts, 
  Http2Ctx, 
  Http2Stream
} from "arnelify-server";

(async function main() {

  const http2_opts: Http2Opts = {
    allow_empty_files: true,
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    charset: "utf-8",
    compression: true,
    keep_alive: 30,
    keep_extensions: true,
    key_pem: "certs/key.pem",
    max_fields: 60,
    max_fields_size_total_mb: 1,
    max_files: 3,
    max_files_size_total_mb: 60,
    max_file_size_mb: 60,
    port: 4433,
    storage_path: "/var/www/node/storage",
    thread_limit: 4
  };

  const http2: Http2 = new Http2(http2_opts);
  http2.logger(async (_level: string, message: string): Promise<void> => {
    console...
Read more

v0.9.5

02 Mar 02:48

Choose a tag to compare

Arnelify Logo

Arnelify Server for NodeJS NodeJS Bun

🚀 About

Arnelify® Server for Node — a multi-language server with HTTP 3.0 and WebTransport support.

All supported protocols:

# Protocol Transport
1 TCP1 HTTP 1.1
2 TCP1 HTTP 2.0
3 TCP1 WebSocket
4 TCP2 HTTP 3.0
5 TCP2 WebTransport

📋 Minimal Requirements

Important: It's strongly recommended to use in a container that has been built from the gcc v15.2.0 image.

  • CPU: Apple M1 / Intel Core i7 / AMD Ryzen 7
  • OS: Debian 11 / MacOS 15 / Windows 10 with WSL2.
  • RAM: 4 GB

📦 Installation

Install Neon v0.10.1

yarn global add neon-cli@0.10.1

Run in terminal:

yarn add arnelify-server

🎉 TCP2 / WebTransport

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { WebTransport_, WebTransportOpts, WebTransportBytes, WebTransportCtx, WebTransportStream } from "arnelify-server";

(function main() {

  const ws_opts: WebTransportOpts = {
    block_size_kb: 64,
    cert_pem: "certs/cert.pem",
    compression: true,
    handshake_timeout: 30,
    key_pem: "certs/key.pem",
    max_message_size_kb: 64,
    ping_timeout: 30,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws = new WebTransport_(ws_opts);

  ws.on("connect", (ctx: WebTransportCtx, bytes: WebTransportBytes, stream: WebTransportStream): void => {
    stream.push(ctx, bytes);
    stream.close();
  });

  ws.start();

})();

🎉 TCP2 / HTTP 3.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { Http3, Http3Opts, Http3Ctx, Http3Stream } from "arnelify-server";

(function main() {

const http3_opts: Http3Opts = {
  allow_empty_files: true,
  block_size_kb: 64,
  cert_pem: "certs/cert.pem",
  charset: "utf-8",
  compression: true,
  keep_alive: 30,
  keep_extensions: true,
  key_pem: "certs/key.pem",
  max_fields: 10,
  max_fields_size_total_mb: 1,
  max_files: 3,
  max_files_size_total_mb: 60,
  max_file_size_mb: 60,
  port: 4433,
  storage_path: "/var/www/node/storage",
  thread_limit: 4
};

const http3 = new Http3(http3_opts);

http3.on("/", (ctx: Http3Ctx, stream: Http3Stream): void => {

  stream.set_code(200);
  stream.push_json(ctx);
  stream.end();

});

http3.start();

})();

🎉 TCP1 / WebSocket

📚 Configuration

Option Description
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
HANDSHAKE_TIMEOUT Maximum time in seconds to complete the TLS handshake.
MAX_MESSAGE_SIZE_MB Maximum size of a single message the server will accept from a client.
PING_TIMEOUT Maximum time the server will wait for a ping from the client.
PORT Defines which port the server will listen on.
SEND_TIMEOUT Maximum time for the client to receive a response from the server.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { WebSocket_, WebSocketOpts, WebSocketBytes, WebSocketCtx, WebSocketStream } from "arnelify-server";

(function main() {

  const ws_opts: WebSocketOpts = {
    block_size_kb: 64,
    compression: true,
    handshake_timeout: 30,
    max_message_size_kb: 64,
    ping_timeout: 30,
    port: 4433,
    send_timeout: 30,
    thread_limit: 4
  };

  const ws = new WebSocket_(ws_opts);

  ws.on("connect", (ctx: WebSocketCtx, bytes: WebSocketBytes, stream: WebSocketStream): void => {
    stream.push(ctx, bytes);
    stream.close();
  });

  ws.start();

})();

🎉 TCP1 / HTTP 2.0

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CERT_PEM Path to the TLS cert-file in PEM format.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
KEY_PEM Path to the TLS private key-file in PEM format.
MAX_FIELDS Defines the maximum number of fields in the received form.
MAX_FIELDS_SIZE_TOTAL_MB Defines the maximum total size of all fields in the form. This option does not include file sizes.
MAX_FILES Defines the maximum number of files in the form.
MAX_FILES_SIZE_TOTAL_MB Defines the maximum total size of all files in the form.
MAX_FILE_SIZE_MB Defines the maximum size of a single file in the form.
PORT Defines which port the server will listen on.
STORAGE_PATH Specifies the upload directory for storage.
THREAD_LIMIT Defines the maximum number of threads that will handle requests.

📚 Examples

import { Http2, Http2Opts, Http2Ctx, Http2Stream } from "arnelify-server";

(function main() {

const http2_opts: Http2Opts = {
  allow_empty_files: true,
  block_size_kb: 64,
  cert_pem: "certs/cert.pem",
  charset: "utf-8",
  compression: true,
  keep_alive: 30,
  keep_extensions: true,
  key_pem: "certs/key.pem",
  max_fields: 10,
  max_fields_size_total_mb: 1,
  max_files: 3,
  max_files_size_total_mb: 60,
  max_file_size_mb: 60,
  port: 4433,
  storage_path: "/var/www/node/storage",
  thread_limit: 4
};

const http2 = new Http2(http2_opts);

http2.on("/", (ctx: Http2Ctx, stream: Http2Stream): void => {

  stream.set_code(200);
  stream.push_json(ctx);
  stream.end();

});

http2.start();

})();

🎉 TCP1 / HTTP 1.1

📚 Configuration

Option Description
ALLOW_EMPTY_FILES If this option is enabled, the server will not reject empty files.
BLOCK_SIZE_KB The size of the allocated memory used for processing large packets.
CHARSET Defines the encoding that the server will recommend to all client applications.
COMPRESSION If this option is enabled, the server will use BROTLI compression if the client application supports it. This setting increases CPU resource consumption. The server will not use compression if the data size exceeds the value of BLOCK_SIZE_KB.
KEEP_EXTENSIONS If this option is enabled, file extensions will be preserved.
MAX_FIELDS Defines the max...
Read more