🚧 We are still building the lighthouse. Hang tight!

projectlighthouse logoprojectlighthouse

Sign in with your Google or GitHub account to get started

Task 1 of 9

Bind to a Port

50 XP
terminal
$lux run --project build-your-own-http-server --task bind-to-a-port

Scoring

PointsMax AttemptsTime Limit
50 XP5 attempts10 min
35 XP10 attempts20 min
20 XP20 attempts30 min

Instructions

Create a TCP server that listens for incoming connections on a specified port.

Your implementation should:

  • Create a TCP socket
  • Bind to port 4221 (or a configurable port)
  • Listen for incoming connections
  • Accept a connection (the connection can be closed immediately for now)

Expected behavior:

$ ./your-server
Server listening on port 4221...

Test with:

$ curl -v http://localhost:4221

(The connection will be accepted but no response sent yet)

© 2025 projectlighthouse. All rights reserved.