This project is a fork of [Ciquidus Explorer](https://github.com/suprnurd/ciquidus) which is a fork of [Iquidus Explorer](https://github.com/iquidus/explorer). Shoutouts to both Luke Williams for the original code and Alan Rudolf for all the additional bonus featues which saved me tons of time! I'm only standing on the shoulders of giants. Thank you both!!!
git clone https://github.com/team-exor/eiquidus explorer
### Install node modules
cd explorer && npm install --production
### Configure
cp ./settings.json.template ./settings.json
*Make required changes in settings.json*
### Start Explorer
npm start
**NOTE:** mongod must be running to start the explorer
The explorer defaults to cluster mode, forking an instance of its process to each cpu core. This results in increased performance and stability. Load balancing gets automatically taken care of and any instances that for some reason die, will be restarted automatically. For testing/development (or if you just wish to) a single instance can be launched with
The wallet connected to eIquidus must be running with the following flags:
-daemon -txindex
You may either call your coins daemon using this syntax:
```
coind -daemon -txindex
```
or else you can add the settings to your coins config file (recommended):
```
daemon=1
txindex=1
```
### CORS support
eIquidus has basic CORS support which is useful for taking advantage of the block explorer api in your other web projects.
#### What is CORS?
*CORS description taken from [MaxCDN One](https://www.maxcdn.com/one/visual-glossary/cors/)*
>To prevent websites from tampering with each other, web browsers implement a security measure known as the same-origin policy. The same-origin policy lets resources (such as JavaScript) interact with resources from the same domain, but not with resources from a different domain. This provides security for the user by preventing abuse, such as running a script that reads the password field on a secure website.
>In cases where cross-domain scripting is desired, CORS allows web developers to work around the same-origin policy. CORS adds HTTP headers which instruct web browsers on how to use and manage cross-domain content. The browser then allows or denies access to the content based on its security configuration.
#### How to benefit from using CORS?
You must first set up CORS in eIquidus by editing the settings.json file and setting the value for `usecors` to true.
```
"usecors": true,
```
The `corsorigin` setting defaults to "\*" which allows all requests from any origin. Keeping this setting at "\*" can lead to abuse and is not recommended. Therefore, you should change the `corsorigin` setting to an external origin that you control, as seen in the following example:
```
"corsorigin": "http://example.com",
```
The above example would allow sharing of resources from eIquidus for all data requests coming from the example.com domain while all requests coming from any other domain would be rejected as per normal.
Below is an example of a simple javascript call using [jQuery](https://jquery.com) that could be used on your example.com website to return the current block count from eIquidus:
Nodes default stack size may be too small to index addresses with many tx's. If you experience the above error while running sync.sh the stack size needs to be increased.