I've been seeing the examples of Racket to make a server, and although I 
learned a lot, I'd love to know how to actually launch it so, for example, a 
friend can see my page from his house.


For the best example, let's say i have the Hello World server, what changes do 
i need to make so someone can access it from a browser? can I use a webpage 
like www.hello.com ? Can I do it from my computer?    


#lang web-server/insta

;; A "hello world" web server
(define (start request)
  (response/xexpr
   '(html
     (body "Hello World"))))



Also, to make something like this work between 2 different computers over the 
internet:


(define listener (tcp-listen 12345))
(let echo-server ()
  (define-values (in out) (tcp-accept listener))
  (thread (lambda () (copy-port in out)
                     (close-output-port out)))
  (echo-server))


Would i need to write a client that connects to the servers IP and to the 
specified port?


Thanks in advance.
                                          
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to