Skip to content

Commit 38d4561

Browse files
Saif Al-Dilaimidrew-gross
authored andcommitted
fixed error call (#365)
* fixed error call * test1 * test2 * fixed error logs again * information for users that installed it globally
1 parent c1e8d62 commit 38d4561

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

Parse-Dashboard/app.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ function checkIfIconsExistForApps(apps, iconsFolder) {
3434
var path = iconsFolder + "/" + iconName;
3535

3636
fs.stat(path, function(err, stat) {
37-
if (err != null && err.code == 'ENOENT') {
38-
// file does not exist
39-
console.warn("Icon with file name: " + iconName +
40-
" couldn't be found in icons folder!");
37+
if (err) {
38+
if ('ENOENT' == err.code) {// file does not exist
39+
console.warn("Icon with file name: " + iconName +" couldn't be found in icons folder!");
40+
} else {
41+
console.log(
42+
'An error occurd while checking for icons, please check permission!');
43+
}
4144
} else {
42-
console.log(
43-
'An error occurd while checking for icons, please check permission: ',
44-
err.code);
45+
//every thing was ok so for example you can read it and send it to client
4546
}
46-
});
47+
} );
4748
}
4849
}
4950

@@ -148,7 +149,7 @@ module.exports = function(config, allowInsecureHTTP) {
148149
// Directory doesn't exist or something.
149150
console.warn("Iconsfolder at path: " + config.iconsFolder +
150151
" not found!");
151-
}
152+
}
152153
}
153154

154155
// For every other request, go to index.html. Let client-side handle the rest.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Parse Dashboard is a standalone dashboard for managing your Parse apps. You can
2121

2222
# Getting Started
2323

24-
[Node.js](https://nodejs.org) version >= 4.3 is required to run the dashboard. You also need to be using Parse Server version 2.1.4 or higher.
24+
[Node.js](https://nodejs.org) version >= 4.3 is required to run the dashboard. You also need to be using Parse Server version 2.1.4 or higher.
2525

2626
# Local Installation
2727

@@ -91,7 +91,7 @@ You can manage self-hosted [Parse Server](https://github.com/ParsePlatform/parse
9191

9292
## App Icon Configuration
9393

94-
Parse Dashboard supports adding an optional icon for each app, so you can identify them easier in the list. To do so, you *must* use the configuration file, define an `iconsFolder` in it, and define the `iconName` parameter for each app (including the extension). The path of the `iconsFolder` is relative to the configuration file. To visualize what it means, in the following example `icons` is a directory located under the same directory as the configuration file:
94+
Parse Dashboard supports adding an optional icon for each app, so you can identify them easier in the list. To do so, you *must* use the configuration file, define an `iconsFolder` in it, and define the `iconName` parameter for each app (including the extension). The path of the `iconsFolder` is relative to the configuration file. If you have installed ParseDashboard globally you need to use the full path as value for the `iconsFolder`. To visualize what it means, in the following example `icons` is a directory located under the same directory as the configuration file:
9595

9696
```json
9797
{
@@ -110,7 +110,7 @@ Parse Dashboard supports adding an optional icon for each app, so you can identi
110110

111111
## Other Configuration Options
112112

113-
You can set `appNameForURL` in the config file for each app to control the url of your app within the dashboard. This can make it easier to use bookmarks or share links on your dashboard.
113+
You can set `appNameForURL` in the config file for each app to control the url of your app within the dashboard. This can make it easier to use bookmarks or share links on your dashboard.
114114

115115
To change the app to production, simply set `production` to `true` in your config file. The default value is false if not specified.
116116

@@ -176,7 +176,7 @@ httpServer.listen(4040);
176176
Make sure the server URLs for your apps can be accessed by your browser. If you are deploying the dashboard, then `localhost` urls will not work.
177177

178178
## Security Considerations
179-
In order to securely deploy the dashboard without leaking your apps master key, you will need to use HTTPS and Basic Authentication.
179+
In order to securely deploy the dashboard without leaking your apps master key, you will need to use HTTPS and Basic Authentication.
180180

181181
The deployed dashboard detects if you are using a secure connection. If you are deploying the dashboard behind a load balancer or proxy that does early SSL termination, then the app won't be able to detect that the connection is secure. In this case, you can start the dashboard with the `--allowInsecureHTTP=1` option. You will then be responsible for ensureing that your proxy or load balancer only allows HTTPS.
182182

0 commit comments

Comments
 (0)