Well, it's a simple train journey, either direct or with a change in Ventimiglia, and pretty picturesque at that! You can stop overnight somewhere on the Liguarian coast pretty easily too, as it passes through places such as Ventimiglia, San Remo and Genoa. The direct journey is as little as 4h30.
Booking in advance, you can get the through ticket for €15 on the 'SMART' tarriff.