- a) Install Node
- b) Install Docker Desktop
- c) Install VS Code
- d) Install VS Code extensions
- Docker or Docker explorer
- Azure Functions Extension
- e) Install Azure Functions Core Tools: https://github.com/Azure/azure-functions-core-tools
- Init the function (choose Node->JavaScript)
func init MyToDoList --docker
- Change Hello/function.json to be
"authLevel": "anonymous",
- CD to folder and create new (HTTP trigger) and provide a name
Hello
cd
func new
- Docker build & run
docker build --rm -f "javascript/MyToDoList/Dockerfile" -t mytodo-serverless:latest javascript/MyToDoList
docker run -p 8080:80
- Optionally: Start the function locally
func start --build
-
Optionally, with Docker compose (required for MongoDBs)
Building functions Step 1/6 : FROM microsoft/dotnet:2.2-sdk AS installer-env 2.2-sdk: Pulling from microsoft/dotnet 9a0b0ce99936: Pull complete db3b6004c61a: Pull complete f8f075920295: Pull complete 6ef14aff1139: Pull complete c05081985e91: Pull complete 6c5e96b85e8c: Pull complete d39c626fbbd1: Extracting [===========> ] 67.4MB/300.7MB
a) Install ngrok
- Install NativeScript CLI + init template
npm install -g nativescript
Then
$ npm install -g @vue/cli @vue/cli-init
- Create a templated-app project
vue init nativescript-vue/vue-cli-template <project-name>
- Go to project, install and run/preview it
- cd MyTodoApp
- npm install
- tns build ios
- tns preview
- tns run android
- Run ngrok for HTTPS redirects (functions) and consume the endpoint in the VueJS/NativeScript
./ngrok http 8080 --host-header=localhost:8080
Install MongoDB (Docker pull)
docker pull mongo:4.0.4
and
docker run -d -p 27017-27019:27017-27019 --name mongodb mongo:4.0.4
Install from VS Code: - Azure Cosmos DB
Go to Azure extension -> CosmosDB Attached Databvase Accounts -> Attach Database Account
mongodb://127.0.0.1:27017
docker system prune
FunctionApp
| - host.json
| - myNodeFunction
| | - function.json
| - lib
| | - sayHello.js
| - node_modules
| | - ... packages ...
| - package.json
func azure functionapp publish <YourFunctionAppName> --publish-local-settings -i --overwrite-settings -y
https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale
https://github.com/aspnet/AzureSignalR-samples/tree/master/samples/SimpleEcho
ps aux kill -9 ID
sudo apt-get update sudo apt-get install azure-functions-core-tools