server.port

NES2+Syntax

server.port

Description

The port property of the server object contains the port number to which the Web server is responding.

Example

Listing 8.136 writes the port of the server to the user's page.

Listing 8.136 Accessing the port Property
<SERVER>

// Write the port property to the user's page
write(server.port);

</SERVER>
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.