{"id":17465957,"url":"https://github.com/paladique/azuresample-guestbook","last_synced_at":"2026-04-30T00:02:27.773Z","repository":{"id":56261632,"uuid":"303841827","full_name":"paladique/AzureSample-Guestbook","owner":"paladique","description":"Guestbook using MySQL and Cosmos DB on Azure","archived":false,"fork":false,"pushed_at":"2020-11-17T23:27:00.000Z","size":27,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T21:35:32.945Z","etag":null,"topics":["cosmosdb","data","mysql","spa","websockets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paladique.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-13T22:20:54.000Z","updated_at":"2023-07-25T14:40:00.000Z","dependencies_parsed_at":"2022-08-15T15:40:19.186Z","dependency_job_id":null,"html_url":"https://github.com/paladique/AzureSample-Guestbook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paladique/AzureSample-Guestbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-Guestbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-Guestbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-Guestbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-Guestbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paladique","download_url":"https://codeload.github.com/paladique/AzureSample-Guestbook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-Guestbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cosmosdb","data","mysql","spa","websockets"],"created_at":"2024-10-18T13:07:21.212Z","updated_at":"2026-04-30T00:02:27.737Z","avatar_url":"https://github.com/paladique.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Driven Guestbook\n\n[Guestbooks](https://en.wikipedia.org/wiki/Guestbook) are a way for visitors to a event or location to leave their mark, typically with their name and message. Around the late 1990s/early 2000s, digital guestbooks were pretty popular.\n\nThis simplified demo is a digital guestbook that walks through different types of data, using the Azure Data platform.\n\n👷🏿‍♀️⚠ *This is functional, but still a work in progress! Contributions welcome!*\n\n## How it works\n\n[See it in action!](https://sdcdatademo.azurewebsites.net/)\n\nThis demo is single page application (SPA), written in JavaScript that reads from MySQL and Cosmos DB databases.\n\nFeatures:\n\n- Grabs all entries from both databases, displays which database it came from, and sorts them by date\n- Adds new entries to database of choice and updates page\n- Notifies all users of new entries using Web Sockets\n\n## Azure Resources Uses\n\n- [Azure DB for MySQL](https://docs.microsoft.com/azure/mysql/overview?WT.mc_id=academic-0000-jasmineg)\n- [Cosmos DB (Mongo DB API)](https://docs.microsoft.com/azure/cosmos-db/mongodb-introduction?WT.mc_id=academic-0000-jasmineg)\n- [Azure App Service (optional)](https://docs.microsoft.com/azure/app-service/?WT.mc_id=academic-0000-jasmineg)\n\n## How to Run\n\n### Requirements\n\n- [Azure Account](https://azure.microsoft.com/free/?WT.mc_id=academic-0000-jasmineg)\n- [Node.js](https://nodejs.org/)\n- Clone/download this repo\n\n## Create and configure Azure resources\n\n*Recommended: Once your Azure resources are deployed, pin it to your dashboard in the Azure Portal*\n\n1. Click this button to create a MySQL and CosmosDB Database in Azure, wait a few minutes for your services to be created. **Keep note of the resource group you created so you can find your databases later!**\n\n[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/?WT.mc_id=academic-0000-jasmineg#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fpaladique%2FSample-IntroData%2Fmain%2Ftemplate%2FdeployTemplate.json)\n   \n2. After your services has been created, go to the [Azure portal](portal.azure.com)\n\n## Configure MySQL\n\n3. Open your MySQL Server (starts with `mysql-`).\n4. Download this [certificate](https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem) and copy to the root of this directory. [***Why you have to do this***](https://docs.microsoft.com/azure/mysql/howto-configure-ssl?WT.mc_id=academic-0000-jasmineg)\n5. On the left menu, visit **Connection Security** and click **+ Add client IP*** to add a firewall rule for your ip address.\n6. Set **Allow access to Azure Services** to **On**.\n7. Go back to the **Overview** in MySQL. Your **server name** and **server admin login name**\n8. Click on the terminal icon at the top of the portal to open the Cloud Shell Terminal.\n9. Connect to MySQL with the following command replace the `servername` and `server admin login name` with the values in the overview of MySQL:\n\n`mysql -h servername.mysql.database.azure.com -u adminname@servername -p`\n\nYou're now connected to your MySQL server. The following commands will set up the database and table:\n\n`USE guestdb;`\n\n```sql\nCREATE TABLE guestbook\n(\n    id serial PRIMARY KEY,\n    entrydate datetime default now(),\n    sender VARCHAR(100),\n    message VARCHAR(200)\n);\n```\n\nIn the .env file, enter the following values:\n\n```javascript\nSQLHost = [servername from overview]\nSQLUser = [server admin login name from overview]\nSQLPassword = [password for admin login]\n```\n\n## Visit Cosmos DB\n\n10. Open your Cosmos DB database (starts with `cosmos-`).\n11. On the left menu, visit **Connection String** and copy the **Primary conenction string**\n\nIn the .env file, enter the following values:\n\n`CosmosConn= [connection string]`\n\n## Run the code\n\nNavigate to the code in your favorite command line tool (You will already be there if using VS Code's terminal)\n\nit should look something like\n`some\\path\\directory\\Sample-IntroData`\n\nEnter the following commands:\n`npm install`\n`npm start`\n\nVisit [localhost:3000](http://localhost:3000/)\n\n### Deploy this site to Azure\n\nCheckout this documentation on how to [deploy this to Azure](https://docs.microsoft.com/azure/app-service/quickstart-nodejs?WT.mc_id=academic-0000-jasmineg\u0026pivots=platform-linux#deploy-to-azure)!\n\n## After you're done\n\nIf you're all done running this sample, [delete the resource group](https://docs.microsoft.com/azure/azure-resource-manager/management/delete-resource-group?WT.mc_id=academic-0000-jasmineg\u0026tabs=azure-portal) that you selected or created when you created the databases.\n\n## Learn more\n\n- [Azure SQL Fundamentals](aka.ms/sdc/SqlFun)\n- [Azure Data Fundamentals](https://docs.microsoft.com/learn/paths/azure-data-fundamentals-explore-core-data-concepts/?WT.mc_id=academic-0000-jasmineg)\n\nContributions are welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaladique%2Fazuresample-guestbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaladique%2Fazuresample-guestbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaladique%2Fazuresample-guestbook/lists"}