MemberTrack
Member / Visitor tracking app for NBCoC
Step by step guide for running the app in debug mode:
Setup
- In Microsoft SQL Server Management Studio, open a connection to localhost.
- Create a new database by the name of 'MemberTrack' (default database name in .\MemberTrack.WebApi\appsettings.Development.json )
- Open .\MemberTrack.DbUti\MemberTrack.sql in SQL Server Management Studio and run it against the new database.
- Open .\MemberTrack.sln in Visual Studio and build it.
- Open command prompt and change directory to .\MemberTrack.DbUtil\bin\Debug\net452\win7-x64
- Run the following command:
MemberTrack.DbUtil.exe
The default parameters will be used:
Datasource: localhost
Catalog: Membertrack
- Install Aurelia CLI (Instructions at http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/the-aurelia-cli/1).
Including NodeJS (at least v6.9.5) and a Git Client if needed.
- Run command: npm install
Creating DB migrations
- To update an existing entity, make sure to update the corresponding mapping file (.CS) in .\MemberTrack.Data\Mappings directory
- To create a new entity, make sure to create a corresponding mapping file (.CS) in .\MemberTrack.Data\Mappings directory
- Open command prompt and navigate to the root directory of the .\MemberTrack.DbUtil project
- Run the following command:
- dotnet ef migrations add 'name of the migration'
- dotnet ef database update
- If the migrations was added with no errors, make sure to re-generate the MemberTrack.sql file
- dotnet ef migrations script -o MemberTrack.sql -i
Web API
- Using Visual Studio, open MemberTrack.WebApi project
- In the 'Standard' toolbar change the 'Debug Target' from 'IIS Express' to 'MemberTrack.WebApi'
- Run the project. A console app should launch stating that the Web API is running on port 5000.
- A browser should launch displaying page http://localhost:5000/membertrack/ that reads:
MemberTrack client placeholder...
Client
- Using Visual Studio Code, use the File\Open Folder... menu item to open MemberTrack.Client project
- Open command prompt and navigate to the root directory of the MemberTrack.Client project
- Run command: au run --watch
Toubleshooting: au run returns "Invalid Command: run"
http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/the-aurelia-cli/12
- Navigate to http://localhost:9000