From bd656781954e3360806416849ad77a509fd6b3ca Mon Sep 17 00:00:00 2001 From: avenmia Date: Sat, 20 Apr 2024 10:10:59 -1000 Subject: [PATCH 1/4] Adding instructions for how to run HIERR as a service --- src/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/README.md b/src/README.md index 5457bbc..e383b91 100644 --- a/src/README.md +++ b/src/README.md @@ -223,3 +223,42 @@ Visit http:///polisconvert. You must be an administrator to be abl 1. Click the "Publish release" at the bottom of the page. 1. On the following page, copy the link for "Source code (zip)" 1. Paste that link into the installation instructions [Google Document in the Node.js installation instructions](https://docs.google.com/document/d/1evPMUb8FKiK-BrtP1ILxUfEr9OE8Vwxyew7zUsragCw/edit#heading=h.c5qw6vbumyf6). + +# Running HIERR as a Service + +1. Download [Non-Sucking Service Manager](https://nssm.cc/download) +2. Unzip the downloaded folder +3. Add the location of the x64 executable to your PATH + - [Add directory to path tutorial](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) +4. Install the service by running the following in powershell + +``` +nssm install HIERR +``` + +5. Set up the service details: + - Path: Point this to your npm executable, usually located at C:\Program Files\nodejs\npm.cmd (adjust if your installation path is different). + - Startup directory: Set this to the directory of your Node.js application where the package.json is located. + - Arguments: run start. + - Service name: Enter a name for your service, HIERR. +6. Dependencies: Configure the service to start after your database service. + - Go to the Dependencies tab. + - Enter the name of your database service (e.g., MSSQLSERVER). +7. Redirect output (optional): If you want to log the output: + - Go to the I/O tab. + - Set the output (stdout) and error (stderr) logs to files on your disk, like C:\logs\hierr-out.log and C:\logs\hierr-err.log. +8. Install the service: Click the "Install service" button. +9. Configure SQL Server + - In SSMS, go to the Security folder under your server instance. + - Right-click on Logins and select New Login…. + - Enter NT AUTHORITY\SYSTEM in the login name. + - In the Default database dropdown, select HIERR. + - Expand Security > Users + - Right click users and select New User + - User name: NT AUTHORITY\SYSTEM + - Login name: NT AUTHORITY\SYSTEM + - Default schema: dbo + - Select Save + - Right click the new user and select Properties + - Go to Membership and select: db_datareader, db_datawriter +10. Run `nssm start HIERR` From 6a1693fff14b9d0d94b37567ccff07a8f1ef0937 Mon Sep 17 00:00:00 2001 From: avenmia Date: Sat, 20 Apr 2024 10:13:10 -1000 Subject: [PATCH 2/4] Specifying that it's a windows service --- src/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/README.md b/src/README.md index e383b91..123d24c 100644 --- a/src/README.md +++ b/src/README.md @@ -224,7 +224,7 @@ Visit http:///polisconvert. You must be an administrator to be abl 1. On the following page, copy the link for "Source code (zip)" 1. Paste that link into the installation instructions [Google Document in the Node.js installation instructions](https://docs.google.com/document/d/1evPMUb8FKiK-BrtP1ILxUfEr9OE8Vwxyew7zUsragCw/edit#heading=h.c5qw6vbumyf6). -# Running HIERR as a Service +# Running HIERR as a Windows Service 1. Download [Non-Sucking Service Manager](https://nssm.cc/download) 2. Unzip the downloaded folder From f762b193ecb37fb15474d45a47d370ffb3544073 Mon Sep 17 00:00:00 2001 From: avenmia Date: Fri, 26 Apr 2024 14:37:32 -1000 Subject: [PATCH 3/4] Update README.md --- src/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/README.md b/src/README.md index 123d24c..5eb146b 100644 --- a/src/README.md +++ b/src/README.md @@ -238,7 +238,7 @@ nssm install HIERR 5. Set up the service details: - Path: Point this to your npm executable, usually located at C:\Program Files\nodejs\npm.cmd (adjust if your installation path is different). - - Startup directory: Set this to the directory of your Node.js application where the package.json is located. + - Startup directory: Set this to the directory of the HIERR application where the package.json is located. - Arguments: run start. - Service name: Enter a name for your service, HIERR. 6. Dependencies: Configure the service to start after your database service. @@ -252,6 +252,7 @@ nssm install HIERR - In SSMS, go to the Security folder under your server instance. - Right-click on Logins and select New Login…. - Enter NT AUTHORITY\SYSTEM in the login name. + - If there's an error saying the user already exists, continue to the next step - In the Default database dropdown, select HIERR. - Expand Security > Users - Right click users and select New User @@ -261,4 +262,4 @@ nssm install HIERR - Select Save - Right click the new user and select Properties - Go to Membership and select: db_datareader, db_datawriter -10. Run `nssm start HIERR` +10. Run `nssm start HIERR` in powershell as Administrator From defd05f0052e7fcca00b574965e6ba7117b2e1ae Mon Sep 17 00:00:00 2001 From: avenmia Date: Sat, 27 Apr 2024 00:41:27 +0000 Subject: [PATCH 4/4] prettier --- src/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/README.md b/src/README.md index 5eb146b..5db113d 100644 --- a/src/README.md +++ b/src/README.md @@ -262,4 +262,4 @@ nssm install HIERR - Select Save - Right click the new user and select Properties - Go to Membership and select: db_datareader, db_datawriter -10. Run `nssm start HIERR` in powershell as Administrator +10. Run `nssm start HIERR` in powershell as Administrator