This is my implementation of Burke Holland's great React CosmoDB sample.
git clone https://github.com/ydogandjiev/taskmeow.git
cd taskmeow
yarn install
The template can be run in development, or in production. For development, use the following workflow.
Create a .env
file at the root of the repository with the following values:
APPSETTING_AAD_ApplicationId="<AAD App ID>"
APPSETTING_AAD_ApplicationSecret="<AAD App Secret>"
APPSETTING_AAD_BaseUri="<SSL Base Uri>"
SQLCONNSTR_DbUri="<DB Uri>"
SQLCONNSTR_DbUsername="<DB Username>"
SQLCONNSTR_DbPassword="<DB Password>"
APPINSIGHTS_INSTRUMENTATIONKEY="AppInsights Instrumentation Key"
yarn start
For authentication to work it's recommended to use an ngrok tunnel to hoist the localhost site to an SSL uri:
ngrok http 3001 --host-header=rewrite [--subdomain=<YOUR_SUBDOMAIN>]
In production, you want Express to serve up your app.
yarn build
Now simply visit the Express app at 'http://localhost:3001' and you will see your app served from the 'build' folder. That's all there is to it!