The site is here: https://www.mithrilalmanac.com
These instructions are for Windows, because that's what I develop on.
-
Install Node and all that Jazz.
-
Install Azure Functions Core Tools. You'll also need an Azure account. I did this using CosmosDB because it seemed like it might be fun to try something different and I have a bunch of credit from having a MSDN account. You'll either need to install the local emulator or just have a MSDN account.
-
You need to create a symbolic link so the fc-functions and fc-web projects can share models. If you're on Windows, that looks something like this if you've cloned it into the repos folder
mklink /D Models "C:\Users\<username>\source\repos\MithrilAlmanac\fc-web\src\Models"
-
Set up your settings in fc-functions you'll need to add a
local.settings.json
file. It should look like this:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "node",
"endpoint": "https://my-azure-endpoint",
"key": "myKey",
"googleClientId": "bunchofNumbers.apps.googleusercontent.com",
"googleClientSecret": "itsasecret",
"authenticationRedirectUrl": "http://localhost:3000/authenticate"
},
"Host": {
"CORS": "*"
}
}
- In fc-web you'll need to create an .env file
REACT_APP_API_ADDRESS="http://localhost:7071/api/"
REACT_APP_GOOGLE_CLIENT_ID="same-as-client-id-in-fc-functions"
- Now you should be able to run things. Run
npm i
andnpm run
in both simultaneously.
© Zachary Shuford 2020