1 | import com.sun.net.httpserver.HttpServer; |
2 | import java.net.InetSocketAddress; |
3 | |
4 | public class main {
|
5 | private static HttpServer server; |
6 | private static int port = 8080; |
7 | |
8 | public static void main(String[] args) throws Exception {
|
9 | server = HttpServer.create(new InetSocketAddress(port), 0); |
10 | server.setExecutor(null); // creates a default executor |
11 | server.start(); |
12 | System.out.println("HTTP server started (listening on port " + port + "!)");
|
13 | } |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
2 comment(s) hidden. show
| Snippet ID: | #597 |
| Snippet name: | Stub HTTP server |
| Eternal ID of this version: | #597/1 |
| Text MD5: | e58235c54d96fb57a620d4414335a9b7 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-04-30 16:13:37 |
| Source code size: | 472 bytes / 14 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1589 / 1789 |
| Referenced in: | [show references] |