Skip to content

Commit ecab432

Browse files
committed
Adding the new documentation for different service names and ports.
1 parent 0b1f0a2 commit ecab432

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

docs/install.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,38 @@
6969
4. Now application is working, don't close the command prompt when app is working (if you want to stop it - press **CTRL+C** to times)
7070

7171
#### 6.2 Running Angular as a Windows Service
72-
73-
1. Go to the Angular folder and type **cmd**
72+
73+
1. Modify svc.js name to have a unique name according to your needs. Default is to leave it as is.
74+
```javascript
75+
var svc = new Service({
76+
name: 'eForm angular',
77+
description: 'eForm angular frontend application',
78+
script: 'server.js'
79+
});
80+
```
81+
2. Modify server.js for the port no according to your needs. Default is to leave it as is.
82+
```javascript
83+
const defaultPort = 3000;
84+
85+
// proxy
86+
var apiProxy = httpProxy.createProxyServer();
87+
var apiForwardingUrl = 'http://localhost:5000/';
88+
apiProxy.on('error', function(e) {
89+
console.error('Error:');
90+
console.info(e);
91+
console.log('-------------------------------------');
92+
});
93+
```
94+
3. Go to the Angular folder and type **cmd**
7495
![file](file_6.png "file")
75-
2. install node-windows with npm, unsing the global flag
96+
4. install node-windows with npm, unsing the global flag
7697
**npm install -g node-windows**
77-
3. Then call **npm link node-windows**
78-
4. If you want to install and start the service, call **npm run winserver-install**
98+
5. Then call **npm link node-windows**
99+
6. If you want to install and start the service, call **npm run winserver-install**
79100
![Install Windows Service](npm_4.png "Install Windows Service")
80-
5. Now you application has been started as a Windows Service
101+
7. Now you application has been started as a Windows Service
81102
![IIS Manager](service_1.png "Windows Service")
82-
6. If you want to stop & uninstall, call **npm run winserver-uninstall**
103+
8. If you want to stop & uninstall, call **npm run winserver-uninstall**
83104
![Uninstall Windows Service](npm_5.png "Uninstall Windows Service")
84105

85106

0 commit comments

Comments
 (0)