Any municipality may operate any such railroad or railroad system owned or leased by it, or rent the same for revenue, to a corporation authorized by law to operate, upon such rentals, terms and conditions, as to operation or otherwise, as may be agreed, and in case of operation by the municipality may make, alter, repeal and enforce ordinances, rules and regulations for such operation, and for fixing and collecting rates and reasonable charges for all services rendered thereby, but every such railroad or railroad system shall be operated exclusively for the transportation of freight.
N.J.S. § 40:68-6