Please see the documentation start page for more detailed documentation.
The CanonnApi Frontend and Backend together rely on Auth0.com for authentication.
To locally develop with authenticated users, please sign up to Auth0 (free plan is fine), make yourself comfortable with it, and then follow the steps explained in Auth0 Setup.
The API is a .NET Core ASP.NET Core WebApi project. You can develop on the API solution with the free Visual Studio 2017 Community Edition.
The database migration tool is a .NET 4.6 command line project. This can also be build with Visual Studio 2017 community edition.
These are the steps required to locally set up the api:
\CanonnApi.Backend\CanonnApi.Database.AutoUpdater
open the file config.json
and enter the connection string with name connectionString
in the format server=SERVERNAME;database=DBNAME;userid=DBUSERNAME;password=DBUSERPASSWORD
. Use the user name / password for the user that may create the database schema (step 1.2) here as well as the database name created in step 1.appsettings.Secrets.json
from the folder docs\configuration\api
to the folder CanonnApi.Backend\CanonnApi.Web
and fill the empty double quotes with your Auth0 domain and client id. Also, fill the connection string for ruinsDb
in the format server=SERVERNAME;database=DBNAME;userid=DBUSERNAME;password=DBUSERPASSWORD
with the user created in step 1.1 and the database name form step 1.The API will locally run on port 52685.
You can either start the API from within Visual Studio or from the commandline. For that, go to the CanonnApi.Backend\CanonnApi.Web
folder and call the start_dev.bat
. This will set an environment variable so that the API runs in Development mode, and compile and start the API project.
The client application / web site is an Angular Single Page Application (SPA), built with Angular 4.
Prerequisites to build the web application:
npm install -g angular-cli
on the commandline to install the angular CLI tooling.CanonnApi.Frontend
and run the command npm install
.
This will install all required additional dependencies for the RuinsApp.To start the development web server and to run the web app:
CanonnApi.Frontend
.ng serve
.http://localhost:4200
to run the app.