Example usage: Changing the default Postgres port from localhost:15432 if [Boxen](https://github.com/boxen/boxen) is installed.
4. Install dependencies.
4. Install dependencies.
`mix do deps.get, local.rebar --force, deps.compile, compile`
5. Create and migrate database.
`mix ecto.create && mix ecto.migrate`
<br/>_Note:_ If you have run previously, drop the previous database
5. Create and migrate database.
`mix ecto.create && mix ecto.migrate`
<br/>_Note:_ If you have run previously, drop the previous database
`mix do ecto.drop, ecto.create, ecto.migrate`
6. Install Node.js dependencies.
`cd apps/block_scout_web/assets && npm install; cd -`
6. Install Node.js dependencies.
`cd apps/block_scout_web/assets && npm install; cd -`
`cd apps/explorer && npm install; cd -`
7. Update your JSON RPC Variant in `apps/explorer/config/dev.exs` and `apps/indexer/config/dev.exs`.
@ -120,7 +120,7 @@ The [development stack page](https://github.com/poanetwork/blockscout/wiki/Devel
8. Update your JSON RPC Endpoint in `apps/explorer/config/dev/` and `apps/indexer/config/dev/`
For the `variant` chosen in step 7, enter the correct information for the corresponding JSON RPC Endpoint in `parity.exs`, `geth.exs`, or `ganache.exs`
9. Enable HTTPS in development. The Phoenix server only runs with HTTPS.
* `cd apps/block_scout_web`
* `mix phx.gen.cert blockscout blockscout.local; cd -`
@ -132,14 +132,14 @@ The [development stack page](https://github.com/poanetwork/blockscout/wiki/Devel
```
* If using Chrome, Enable `chrome://flags/#allow-insecure-localhost`.
9. Start Phoenix Server.
9. Start Phoenix Server.
`mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
_Additional runtime options:_
* Run Phoenix Server with IEx (Interactive Elixer)
* Run Phoenix Server with IEx (Interactive Elixer)
`iex -S mix phx.server`
* Run Phoenix Server with real time indexer
@ -204,29 +204,29 @@ To monitor build status, configure your local [CCMenu](http://ccmenu.org/) with
#### Running the tests
1. Build the assets.
1. Build the assets.
`cd apps/block_scout_web/assets && npm run build; cd -`
2. Format the Elixir code.
2. Format the Elixir code.
`mix format`
3. Run the test suite with coverage for whole umbrella project. This step can be run with different configuration outlined below.
`mix coveralls.html --umbrella`
4. Lint the Elixir code.
4. Lint the Elixir code.
`mix credo --strict`
5. Run the dialyzer.
5. Run the dialyzer.
`mix dialyzer --halt-exit-status`
6. Check the Elixir code for vulnerabilities.
`cd apps/explorer && mix sobelow --config; cd -`
6. Check the Elixir code for vulnerabilities.
`cd apps/explorer && mix sobelow --config; cd -`
`cd apps/block_scout_web && mix sobelow --config; cd -`
7. Lint the JavaScript code.
7. Lint the JavaScript code.
`cd apps/block_scout_web/assets && npm run eslint; cd -`
8. Test the JavaScript code.
8. Test the JavaScript code.
`cd apps/block_scout_web/assets && npm run test; cd -`