Default port or not?
See original GitHub issueJavalin has used port 7000
since v1 in case no port is specified. I recently changed this to port 0
, which means Javalin will start on a random available port in case you don’t specify a port explicitly.
Javalin.create().start(); // before, this would start on port 7000
Any thoughts on this change?
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
List of TCP and UDP port numbers - Wikipedia
Port TCP UDP
1024 Reserved Reserved
1025 Yes Yes
1027 Reserved
Read more >What are port numbers and how do they work? - TechTarget
Port number 8080 is usually used for web servers. When a port number is added to the end of the domain name, it...
Read more >Understanding Default Open Ports - Aruba Networks
Port Number Protocol Where Used
17 TCP controller
21 TCP controller
22 TCP controller
Read more >Does changing default port number actually increase security?
In my opinion moving the port that an application runs on does not increase security at all - simply for the reason ...
Read more >Running SQL Server 'Default' instance on a non-default (or ...
We know that with the default setup of SQL Server (SQL Server 2000/2005/2008), the 'Default' instance listens on TCP port 1433. But we...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Randomness is weird, I’d rather have a default port. Default ports has a tendency to be remembered in browsers when debugging as well 😃
I searched for
javalin start
on GitHub and have looked through about a hundred of the projects at random. I didn’t find a single one that callsstart()
without a port specified, unless it was using a customServer
.(There are some projects that call
start()
without a port, but they use an older version of Javalin where you had to callport(port).start()
)I could of course have gotten lucky with my samples, but I’m starting to think this won’t be a very dramatic change. A lot of projects changed it to 8080 too.
I would really liket that, but we have to support the case where you’re starting a
Server
that has its own custom connectors. It could be possible to change server from being a config option to being an overload on start, so you haveBut that comes with its own set of challenges (we need to be careful to not introduce a hard dependency on Jetty).