An application to build two blocks of apartments with no parking spaces close to a railway station have been granted planning permission.