This repository contains the full source code of the Nitro Cats Demo app, built using Nitro stack:
The following additional tools were also used in this demo:
To run this demo, you need an Azure account. If you don't have an account, you can create one for free using this link.
To run the backend, you first have to create an Azure Storage account and a SAS key. You can do that in the Azure portal or using the Azure CLI:
# Create the new resource group
az group create --name <group_name> --location eastus
# Create the storage account
az storage account create --name <storage_account_name> --resource-group <group_name>
# Get the storage account connection string
az storage account show-connection-string --name <storage_account_name>
# Generate the SAS key
az storage account generate-sas --account-name <storage_account_name> --services btf --resource-types sco --permissions acdlrw --expiry 2020-12-31
Then create a .env
file in the server
folder with the following information:
AZURE_STORAGE_ACCOUNT=<your storage account name>
AZURE_STORAGE_CONNECTION_STRING=<your storage account connection string>
AZURE_STORAGE_SAS_KEY=<your SAS key>
After that, go the server folder and run:
npm install
npm start
The server should start and listen on http://localhost:3000
.
You can test it's working properly with the command curl http://localhost:3000/api
, which should display API version: 1.0.0
.
Once you have the backend running, you can run the frontend with these commands:
npm install
npm run start:local
Then go to http://localhost:4200
in your browser to add some cats!
nitro-cats is MIT licensed.
Contributors to this repo follow this Code of Conduct.