This document will guide you through the steps to install FreeBrowse locally and then deploy it to Azure.
git clone https://[email protected]/gv-grip/FreeBrowse/_git/FreeBrowse cd .\FreeBrowse
Navigate to the client-side directory, which is called ClientApp
:
cd ClientApp
npm install
- Open SQL Server Management Studio (SSMS).
- Connect to your SQL Server instance.
In the ASP.NET solution, find the appsettings.json
file and update the SQL connection string with your local database details.
Navigate back to the root directory of the application and run: dotnet run
The backend server will run on http://localhost:5001
The client-side app will run on http://localhost:44444
Open your browser and go to http://localhost:44444
to view the application.
In the appsettings.json
file, there is a configuration named UseLocalStorage
. This setting determines where the application saves files.
- If
UseLocalStorage
is set totrue
, the application will save files on the local machine. - If
UseLocalStorage
is set tofalse
, the application will store files in Azure Blob Storage. Ensure that you've correctly set up and configured Azure Blob Storage in your application and provided necessary connection strings.
Ensure to choose the appropriate storage method depending on your application's needs and deployment scenarios.
- Visual Studio: Preferred for .NET development.
- Visual Studio Code: Lightweight editor suitable for JavaScript development.
- SQL Server Management Studio (SSMS): For managing and querying SQL Server databases.
- Built-in debugging in Visual Studio of Visual Studio Code: Utilize breakpoints, watch variables, inspect the call stack.
- Browser Developer Tools: For client-side debugging.
- Clone the Repository: Get the latest codebase from the repository.
- Branching: Create feature or bug-fix branches.
- Development: Make changes using the recommended IDEs.
- Code Review: Submit pull requests and have peer reviews.
- Merge and Deploy: Merge into the main branch and deploy to the desired environment.
```bash dotnet run ```
Press Ctrl + C
in the terminal where the service is running.
Stop the service as above and start it again using dotnet run
.
Use the debugging tools in the IDE, setting breakpoints and watching variables as needed.
- FreeBrowse: Main application repository, including the backend and client app.
- Niivue.Fork: Contains the our version of the niivue package
-
Frontend: ```bash cd ClientApp npm run build ```
-
Backend: ```bash dotnet build ```
Note: You don't have to build the frontend project every time you make changes to it. Simply refresh your browser to see the updates.
- Installed local Jupyter Notebook or access to online Jupyter Notebook instance
- Start Jupyter Notebook locally:
jupyter notebook
or
- Navigate to the online instance
Demos and more information on how to use ipyniivue can be found
- on GitHub
- Demo files
- An active Azure account
- Azure CLI installed
- Go to the Azure portal.
- Create a new SQL database and configure the firewall settings to allow connections.
- Note down the connection string.
Update the production section of appsettings.json
or use Azure's Application Settings for your app service to override the connection string with the one from your Azure SQL database.
In your terminal or command prompt, from the project directory: dotnet publish -c Release
-
First, log in to Azure CLI:
az login
-
Create a resource group:
az group create --name <your-resource-group-name> --location <preferred-location>
-
Create an Azure App Service plan:
az appservice plan create --name <your-app-service-plan-name> --resource-group <your-resource-group-name> --sku B1 --is-linux
-
Create a web app:
az webapp create --resource-group <your-resource-group-name> --plan <your-app-service-plan-name> --name <your-app-name> --runtime "DOTNET|5.0" --deployment-local-git
-
Set up local git deployment:
az webapp deployment user set --user-name <username> --password <password>
-
Push to Azure from your local git:
git remote add azure <deployment-local-git-url-from-previous-step> git push azure master
Go to https://<your-app-name>.azurewebsites.net
in your browser.