sis_developer_manual
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sis_developer_manual [2024/06/18 03:20] – ghachey | sis_developer_manual [2025/07/29 05:02] (current) – [Building and Running Backend] ghachey | ||
---|---|---|---|
Line 39: | Line 39: | ||
* [[https:// | * [[https:// | ||
- | <note warning> | + | <note warning> |
===== Setting Up the Development Environment ===== | ===== Setting Up the Development Environment ===== | ||
Line 47: | Line 47: | ||
Most developers currently use Visual Studio, Visual Studio Code, dotnet 6.0, MySQL, NodeJS/NPM. And SourceTree/ | Most developers currently use Visual Studio, Visual Studio Code, dotnet 6.0, MySQL, NodeJS/NPM. And SourceTree/ | ||
- | |||
- | |||
- | <note warning> | ||
- Download and install [[https:// | - Download and install [[https:// | ||
- Download and install latest [[https:// | - Download and install latest [[https:// | ||
- Download and install [[https:// | - Download and install [[https:// | ||
- | - Download and install latest LTS [[https:// | + | - Download and install latest LTS [[https:// |
- [Optional] Download and install [[https:// | - [Optional] Download and install [[https:// | ||
Line 139: | Line 136: | ||
==== Database Upgrades ==== | ==== Database Upgrades ==== | ||
- | Database upgrades are done using the .NET EntityFrameworkCore migrations. When a new migration is made available typically in the source code you'll need to apply the migration. | + | Database upgrades are done using the .NET EntityFrameworkCore migrations. When a new migration is made available typically in the source code you'll need to apply the migration. |
- | + | ||
- | < | + | |
- | PM> Update-Database -Project opensis.data -Context CRMContextMySQL | + | |
- | Build started... | + | |
- | Build succeeded. | + | |
- | Applying migration ' | + | |
- | Done. | + | |
- | </ | + | |
- | + | ||
- | A developer also suggested another by " | + | |
- | + | ||
- | <note important> | + | |
<code csharp> | <code csharp> | ||
Line 184: | Line 169: | ||
</ | </ | ||
- | </note> | + | With the above configured the upgrade will run automatically by loading the application. Another way is to open the Package Manager Console within Visual Studio and run something like the following. |
+ | |||
+ | < | ||
+ | PM> Update-Database -Project opensis.data -Context CRMContextMySQL | ||
+ | Build started... | ||
+ | Build succeeded. | ||
+ | Applying migration ' | ||
+ | Done. | ||
+ | </code> | ||
+ | |||
+ | A developer also suggested another by " | ||
==== Building and Running Backend ==== | ==== Building and Running Backend ==== | ||
Line 192: | Line 187: | ||
{{ : | {{ : | ||
+ | ==== Initialize First User ==== | ||
+ | |||
+ | You can use the API endpoint "/ | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
==== Install Frontend Dependencies ==== | ==== Install Frontend Dependencies ==== | ||
Line 230: | Line 248: | ||
</ | </ | ||
+ | Unfortunately, | ||
+ | |||
+ | <code javascript> | ||
+ | setDefaultTenant() { | ||
+ | const url = window.location.href; | ||
+ | |||
+ | let tenant = ''; | ||
+ | if (url.includes(' | ||
+ | // sessionStorage.setItem(' | ||
+ | //tenant = ' | ||
+ | sessionStorage.setItem(' | ||
+ | tenant = ' | ||
+ | } else { | ||
+ | let startIndex = url.indexOf('//' | ||
+ | let endIndex = url.indexOf(' | ||
+ | let tenantName = url.substr(startIndex + 2, endIndex - (startIndex + 2)); | ||
+ | |||
+ | sessionStorage.setItem(' | ||
+ | tenant = tenantName; | ||
+ | } | ||
+ | this.commonModel._tenantName = tenant; | ||
+ | } | ||
+ | </ | ||
==== Building and Running the Frontend ==== | ==== Building and Running the Frontend ==== | ||
sis_developer_manual.1718680820.txt.gz · Last modified: 2024/06/18 03:20 by ghachey