You should make sure that the following components are installed on your machine:
For azure functions development:
- Run
npm install
in the./app/
directory - Run
lt --port 7071 --print-requests
. The output of this command will be used in setup and running astunnel_link
. - Create a file
./infrastructure/variables.tfvars
with the following variables:
webpubsub_tunnel_gateway = <tunnel_link>
- Ensure that you have a valid Azure subscription and run
az login
to login to Azure - Run
terraform apply
to deploy the infrastructure (including test and prod environments) - Rename
template-local.settings.json
infunctions/app
tolocal.settings.json
and fill the following connection strings.- Run
terraform output -raw webpubsub_test_connection_string
in folder./infrastructure
and fill inWebPubSubConnectionString
- Run
terraform output -raw cosmos_test_connection_string
in folder./infrastructure
and fill inCosmosDBConnectionString
- Run
While developing all the following commands should be run in parallel in different terminals.
For webapp building and testing run
sbt devtest
For functions building and testing run
sbt functions
For running functions run in directory functions/app
fun start
For allowing the webpubsub to access the functions run with the tunnel_link
subdomain from setup
lt --subdomain {sub_domain} --port 7071 --print-requests
Then open localhost:12345
in your browser.
Guide written for visual studio code with tailwind css support for outwatch.
Run
npm i
Install vscode plugin Tailwind CSS IntelliSense
and paste into plugin configuration the following settings
"tailwindCSS.includeLanguages": {
"scala": "html"
},
"[scala]": {
"tailwindCSS.experimental.classRegex": [
"\\bcls\\s*:=\\s*\"([^\"]*)\""
],
},
"editor.quickSuggestions": {
"strings": true
}
- For simplicity Tailwind is installed in (in seperate nodejs packages)
webapp/
and in/
, because vs codetailwind intellisense
plugin needs tailwind installed in root directory.