Merly
  • Quick start
  • Guide
    • Routing
    • Start
    • Headers
    • CORS
    • Http methods available
    • Statics files
    • Custom 404 Handler
    • Body parser
    • Middleware
  • Website
  • Code
  • Examples
Powered by GitBook
On this page
  • Configuration
  • TLS

Was this helpful?

  1. Guide

Start

The start function allows to take off the files in a specific IP address and port.

PreviousRoutingNextHeaders

Last updated 4 years ago

Was this helpful?

Configuration

The start function takes three parameters.

  • host: IP address where the process will listen, you can use the ipv4 protocol such as ipv6, it is specified with a string

  • port: the port number where the process will listen, it is indicated with an integer number.

  • verbose: allows you to view the events processed by the process in real time, indicated with a boolean value

The default values that the function receives are:

start( host = "127.0.0.1", port = 8086, verbose = false)

By default, when executing the process, it will only use one processor core. If you want to improve performance you can use a load balancer like NGINX, here you can find an .

TLS

To enable TLS / HTTPS the sslconfig parameter is used, which receives the https certificate files.

If you want to generate HTTPS certificate for localhost domains, you can follow the following .

using MbedTLS

start( sslconfig= MbedTLS.SSLConfig("localhost.crt", "localhost.key") )

example
tutorial