Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

How to run CoralTime

CoralTeam edited this page Jan 4, 2018 · 14 revisions

Step 1: Install Visual Studio 2017

Choose ASP.NET and wev development Workload

step1

Step 2: Install NodeJS

Use LTS Version (example: C:\Program Files\nodejs)

Step 3: Clone Repository

git clone https://github.com/CoralTime/CoralTime.git

Step 4: Additional Setup:

  1. Open Visual Studio: Tools -> Options -> Projects and Solutions -> Web Package Management -> External Web Tools
    1.1. Put path where you install NodeJS (example: C:\Program Files\nodejs)
    1.2. Set this path to the first place in this list:
    * A. Create New Path.
    • B. Fill path where you install NodeJS (example: C:\Program Files\nodejs)
    • C. Put up your row with NodeJS path at the first position by means of an arrow up

VS Setup NodeJs

  1. Open Visual Studio: Tools -> Extensions and Updates.
    2.1. Install NPM Task Runner

Install NPM Task Runner

  1. Open Project in VS by next path: \backend\CoralTime.sln
    3.1. Solution Explorer -> package.json -> Task Runner Explorer.

Task Runner Explorer

3.2. Run ** 1_NpmInstall ** - Install NPM into local fronend folder;
3.3 Build Frontend: 2_BuildFrontEnd

  • If all the scripts have successfully completed, you will see the next message «Process terminated with code 0.»

npm install

3.4. Set CoralTime as StartUp Project (instead default IIS Express) StartUp Project

Step 5: Create DBs

  1. Create CoralTime DB. Uncomment string for create DB in Startup.cs and check DefaultConnection in appsettings.json.
    Run Solution and wait for creation CoralTime Database and check it!

CoralTime DB

2.** Create CoralTimeTest DB.** Change DefaultConnection in appsettings.json and in the Solution.
Restart Solution and wait for creation CoralTimeTest database and check it!

CoralTimeTest DB

3.** Working Setting**
Stop Solution.
Comment string for create DB in Startup.cs and set DefaultConnection and TestConnection in appsettings.json.

working settings

Step 6: Tests

Before Solution fully running, you should check the CoralTime.Tests.
Try to run Tests by TextExplorer and check results. Test results must be successfully.

TextExplorer

About Tests:

  1. «TestMethodNonAuth» try to check ping to your CoralTimeTests Db.
  2. «TestMethodAuth» try to compare count of Members in the CoralTimeTests Db in table Members and your test custom value (2).
    *If you create database by next settings from defaultDBData.json:

CoralTimeTests

That you have next values in your CoralTime.Tests Db in Members table:

CoralTime.Tests

Step 7: Run Solution.

  1. Run Solution and try to login using Login/Password for your User from defaultDBData.json:

login

  1. If your login is successful, you can add your first TimeEntry!

calendar page

  1. After successful adding, you can see:

adding timeEntry

Profit!