simplFT/server/main.go
2017-10-20 18:08:25 +03:00

27 lines
414 B
Go

package main
import (
"net"
"log"
"github.com/metonimie/simpleFTP/server/server"
)
func main() {
listener, err := net.Listen("tcp", "localhost:8080")
if err != nil {
log.Fatal(err)
}
log.Println("Hello world!")
log.Println("Running on:", "localhost", "port", "8080")
for {
conn, err := listener.Accept()
if err != nil {
log.Print(err)
continue
}
go server.HandleConnection(conn)
}
}