{"id":23109356,"url":"https://github.com/sangeethnandakumar/express-notification-service-template","last_synced_at":"2025-04-03T23:15:47.906Z","repository":{"id":142980241,"uuid":"286196062","full_name":"sangeethnandakumar/Express-Notification-Service-Template","owner":"sangeethnandakumar","description":"This repository holds an example template structure for creating a notification worker service in .NET Core that runs as Windows Service or a Linux Daemon","archived":false,"fork":false,"pushed_at":"2020-10-10T17:24:05.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T11:12:38.935Z","etag":null,"topics":["console","dotnet-core","linux-deamon","notification-service","windows-service","worker-service"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sangeethnandakumar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-09T08:19:46.000Z","updated_at":"2020-10-10T17:24:07.000Z","dependencies_parsed_at":"2023-04-07T04:01:57.131Z","dependency_job_id":null,"html_url":"https://github.com/sangeethnandakumar/Express-Notification-Service-Template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangeethnandakumar%2FExpress-Notification-Service-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangeethnandakumar%2FExpress-Notification-Service-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangeethnandakumar%2FExpress-Notification-Service-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangeethnandakumar%2FExpress-Notification-Service-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sangeethnandakumar","download_url":"https://codeload.github.com/sangeethnandakumar/Express-Notification-Service-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092392,"owners_count":20882218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["console","dotnet-core","linux-deamon","notification-service","windows-service","worker-service"],"created_at":"2024-12-17T01:35:53.103Z","updated_at":"2025-04-03T23:15:47.876Z","avatar_url":"https://github.com/sangeethnandakumar.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Express-Notification-Service-Template\n\n## Enable Console out only while Debugging\nconsole out on a Windows Service can create errors espcly while using ColorfulConsole\n```csharp\nvar hasConsoleOut = configuration.GetSection(\"EnableConsoleOut\").Get\u003cbool\u003e();\nif(hasConsoleOut)\n{\n     Console.Clear();\n     ConsoleHeader();\n     ConsoleInfo();\n     QueueList();\n}\n```\n\n## To Run As A Windows Service\nInstall these nuGet libraries\n```nuget\nMicrosoft.Extensions.Hosting\nMicrosoft.Extensions.Hosting.WindowsServices\n```\n\nAdd UseWindowsService(); on program.cs\n```csharp\nHost.CreateDefaultBuilder(args)\n     .UseSerilog((hostingContext, loggerConfiguration) =\u003e loggerConfiguration.ReadFrom.Configuration(hostingContext.Configuration))\n     .ConfigureServices((hostContext, services) =\u003e\n     {\n         services.AddHostedService\u003cWorker\u003e();\n         services.AddSingleton\u003cIMessagingQueue, MessagingQueue\u003e();\n         services.AddSingleton\u003cIConsoleDataProvider, ConsoleDataProvider\u003e();\n     }).UseWindowsService();\n```\n\n### Now Release Mode =\u003e Build\n\n## Powershell To Install Service\nOpen powershell and execute the command to install service on Windows Machines\n```powershell\nsc.exe create \u003cNameOfService\u003e binpath= C:\\test\\service.exe start= auto\n```\n## Powershell To UnInstall Service\nOpen powershell and execute the command to install service on Windows Machines\n\u003e STOP Service first \u0026 execute the command\n```powershell\nsc.exe delete \u003cNameOfService\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangeethnandakumar%2Fexpress-notification-service-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangeethnandakumar%2Fexpress-notification-service-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangeethnandakumar%2Fexpress-notification-service-template/lists"}