Check this code that hosts a wcf webservice on a console.
ServiceHost host = new ServiceHost(typeof(MyService));
ContractDescription description = ContractDescription.GetContract(typeof(IMyService));
Binding binding = new WSHttpBinding();
EndpointAddress address = new EndpointAddress("http://localhost/MyService");
ServiceEndPoint endpoint = new ServiceEndpoint(description, binding, address);
host.Description.Endpoint.Add(endpoint);
host.Open();
Good luck!