The coffee beans when roasted twice can erase the flavours and turn your coffee bitter and is not advisable. The beans when roasted release Co2 which helps to preserve the coffee flavour by displacing oxygen
The basic process is simple: use heat to turn green unroasted coffee into brown roasted coffee. Roasting times vary, depending on the method and batch size, but you can expect the process to last about 10 minutes for smaller batches and about 16 minutes for larger batches. There are many ways to roast coffee.