Skip to content

fixed error call #365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Parse-Dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ function checkIfIconsExistForApps(apps, iconsFolder) {
var path = iconsFolder + "/" + iconName;

fs.stat(path, function(err, stat) {
if (err != null && err.code == 'ENOENT') {
// file does not exist
console.warn("Icon with file name: " + iconName +
" couldn't be found in icons folder!");
if (err) {
if ('ENOENT' == err.code) {// file does not exist
console.warn("Icon with file name: " + iconName +" couldn't be found in icons folder!");
} else {
console.log(
'An error occurd while checking for icons, please check permission!');
}
} else {
console.log(
'An error occurd while checking for icons, please check permission: ',
err.code);
//every thing was ok so for example you can read it and send it to client
}
});
} );
}
}

Expand Down Expand Up @@ -148,7 +149,7 @@ module.exports = function(config, allowInsecureHTTP) {
// Directory doesn't exist or something.
console.warn("Iconsfolder at path: " + config.iconsFolder +
" not found!");
}
}
}

// For every other request, go to index.html. Let client-side handle the rest.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Parse Dashboard is a standalone dashboard for managing your Parse apps. You can

# Getting Started

[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.
[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.

# Local Installation

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

## App Icon Configuration

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:
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:

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

## Other Configuration Options

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.
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.

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

Expand Down Expand Up @@ -176,7 +176,7 @@ httpServer.listen(4040);
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.

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

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.

Expand Down