Minecraft Admin Dashboard using Azure App Service, Containerized Backend, and Notion Integration. Built to explore core AZ-104 concepts like App Services, VNet integration, and deployment automation
- Full-stack Node.js app with Express.js backend from Notion
- Integration with Notion API for data management using their sample full-stack app to get started
- Automated deployment using GitHub Actions using what I learned during the [Minecraft Server build](https://github.com/shevonnepolastre/minecraft-dashboard-app_
- Infrastructure as code using Azure Bicep
- Hosted on Azure App Service (Linux, 64-bit configuration)
https://developers.notion.com/docs/getting-started
git clone https://github.com/shevonnepolastre/minecraft-dashboard-app.git
cd minecraft-dashboard-app
npm install
Go to Notion to create an API. There are two: 1. Internal if it's just for you 2. Public if you plan to have others use it. Right now I am using Internal but when I build out the web form, I plan to change it to public
You will also need the Notion page ID you will be using and add those to a file called ".env":
NOTION_KEY=your-notion-api-key NOTION_PAGE_ID=your-notion-page-id
WARNING: DO NOT forget to add the .env file to your .gitignore
You also want to add from Azure:
- Client ID
- Client Secret
- Tenant ID
- Subscription ID
I used a json so I wouldn't have a secret for each one.
Use bicep to create app service. Do not forget to declare what App Service tier and language you will be using. Also, make sure that you choose the proper OS for it. There are apps that do not run on Linux, and others that do not run on Windows. Make sure to check that.
Make sure the YAML file is in .github/workflows
You can follow the Github guide on self-hosted runners
Enter "node server.js" and then type in your browser "localhost:[number shown after typing node server.js]" and test that the form works and is connecting to Notion.
I created the bicep in the Infrastructure folder and the yaml is in .github/workflows
You can connect to your repository, use VS Code, or do it manually
Make sure to add the variables in the Environment Variables section in Azure and add this to your sever.js:
const notion = new Client({ auth: process.env.NOTION_KEY });
const databaseId = process.env.NOTION_DATABASE_ID;
If you have issues, use Debug Console and Log Stream to look at the errors you are receiving
- Linux is much easier to setup than Windows. Not saying you shouldn't learn Windows but just an observation of which one is easier to work with
- Add your .env to .gitignore BUT make sure you add those variables in Azure
- You cannot use 64-bit on the free App Service plan
- If you want to check out Deployment Slots, you need to go Standard or higher. Basic doesn't have it
- Do not be afraid to use other people's stuff and make it your own