Last active
December 17, 2021 21:08
-
-
Save cameronapak/deb595b439cefadb57867e88230ff658 to your computer and use it in GitHub Desktop.
Launch Partner Portal Server and Front-end in ONE CLICK!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Ths file will exist in .vscode/launch.json in the Partner Portal Front-end Project! | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
// This is a custom command found in my .zshrc. Inside of this command below, write | |
// a command to start your Partner Portal API server. (Note: Make sure to run rvm | |
// to get the proper Ruby version.) | |
"command": "pp-api-start", | |
"name": "Start Server", | |
"request": "launch", | |
"type": "node-terminal", | |
"presentation": { | |
"hidden": true, | |
} | |
}, | |
{ | |
// Using nvm use to run the necessary node version for this project. | |
"command": "nvm use && yarn start", | |
"name": "Start Website", | |
"request": "launch", | |
"type": "node-terminal", | |
"presentation": { | |
"hidden": true, | |
} | |
}, | |
{ | |
"command": "nvm use && yarn cypress:run", | |
"name": "Launch Cypress", | |
"request": "launch", | |
"type": "node-terminal", | |
"presentation": { | |
"hidden": true, | |
} | |
}, | |
{ | |
"command": "nvm use && yarn cypress:open", | |
"name": "Launch Cypress GUI", | |
"request": "launch", | |
"type": "node-terminal", | |
"presentation": { | |
"hidden": true, | |
} | |
}, | |
{ | |
"command": "nvm use && yarn", | |
"name": "Install latest packages", | |
"request": "launch", | |
"type": "node-terminal", | |
}, | |
{ | |
// I think this is the magic sauce that enables me to VS Code debug. | |
"name": "Attach to Front-end", | |
"request": "attach", | |
"type": "node", | |
"port": 3000, | |
"presentation": { | |
"hidden": true, | |
} | |
}, | |
], | |
"compounds": [ | |
{ | |
"name": "Run Web Stack", | |
"configurations": ["Start Server", "Start Website", "Attach to Front-end"] | |
}, | |
{ | |
"name": "Run Tests in Terminal", | |
"configurations": ["Start Server", "Start Website", "Launch Cypress"] | |
}, | |
{ | |
"name": "Run Tests GUI", | |
"configurations": ["Start Server", "Start Website", "Launch Cypress GUI"] | |
} | |
] | |
} |
To run, go to the Debugging tab in VS code. On the dropdown on the top left, select "Run Web Stack" and click the green button!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idk if comments aren't supported, but they work for me on this file!