๐Ÿ“ถHTTP

Provides HTTP and server implementations.

Methods

http.handle()

Registers a new handler for the given pattern.

http.handle("/", function(request) {
    printftw("hello world")
})

http.listen()

Starts an HTTP server with the given address. Executes the provided callback if successful.

http.listen(3000, function() {
    printftw("Server started at http://localhost:3000 ๐ŸŒฑ")
})

Last updated