Setup - TradeMe/PlayMe GitHub Wiki
What you'll need:
- Mongo DB
- Windows Server 2008+ (Windows 7 works ok, but limited number of concurrent TCP connections allowed)
- A premium Spotify subscription
- Visual Studio 2012 (for developers)
- Weyland (Durandal's build optimizer, for developers to rebuild main-built.js) -- now deprecated, to be replaced with Gulp.
There are 3 main components that need to be running for Play Me to do its thing: Mongo, PlayMe.Server.exe and the Play Me website.
First get Mongo installed and start it up. If you installed mongo to C:\mongo, then you can run
C:\Mongo\bin\mongod.exe --dbpath "C:\mongo\bin\data"where dbpath is wherever you want the db itself to be created. This will spin up mongo in a cmd window on port 27017 by default.
To set up the Play Me website, assuming the site is bound to localhost
- Add a web site in IIS
- Set the site name to PlayMe and its application pool to ASP.NET 4.0 (.NET 4, Integrated Pipeline mode)
- Set its physical path to wherever you put the Play Me Web directory
- Leave Host Name empty
- Select the PlayMe website and double click Authentication. Enable 'Basic Authentication' and 'Windows Authentication', disable the rest.
- Expand the PlayMe website and select the Services directory. Double click Authentication. Enable 'Anonymous Authentication', disable the rest.
- Try visiting the website in a browser. If you encounter this error:
Cannot read configuration file due to insufficient permissions
, you'll need to give the machine's IIS_IUSRS account READ permission for the Web folder.
Kicking off the server process is as easy as executing Server\PlayMe.Server.exe as an admin, however we want to set up some config settings in Server\PlayMe.Server.exe.config first.
- Set Spotify.UserName to the username of your premium Spotify account
- Set Spotify.Password to the password of that account
- Set Domain to your company's Windows domain (used for Windows Authentication)
- Add your own username to the AdminUsers key, eg
<add key="AdminUsers" value="<my domain>\myusername" />
That's it. You should be all set to start PlayMe.Server.exe, maybe restart iis, and start queuing songs. If there are some errors appearing in the Server console window, first thing to check is the WCF urls in Server\PlayMe.Server.exe.config and Web\web.config.