Skip to content
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

Running frontend without a local node #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
30 changes: 30 additions & 0 deletions code/dev-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,36 @@ $ ./n0
http://localhost:4200
```

### Running frontend without a local node

For quick debugging or making changes to only the frontend without running a node with Visual Studio Code. You can change launch.json of Visual Studio Code to start an instance of Chrome without Cors checking (Cors prevents localhost from using api.bitclout.com). This way you can use api.bitclout.com as node to test the frontend running on localhost:4200.

```text
# Run the frontend see (above steps in Setup)
ng serve

# Make sure you have Chrome installed.
# Hit F5 or Run debug from the menu. Change the launch.json like this.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"runtimeArgs": ["--disable-web-security"]
}
]
}
```

The next time you run debug it will start an instance of chrome with cors disabled. You can set debug breakpoints in the frontend code.

## Running a local identity service \(optional\)

Running an identity service locally is generally not required. However, doing so is as easy as running the Angular app:
Expand Down