-
Notifications
You must be signed in to change notification settings - Fork 0
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
VL-203 Add simple ui-dashboard #10
Conversation
@@ -30,7 +30,9 @@ | |||
"lint": "eslint src", | |||
"lint:fix": "eslint --fix src", | |||
"prettify": "prettier --write \"./**/*.ts\"", | |||
"start": "npm run compile && node -r dotenv/config dist/main.js dotenv_config_path=.env.default", | |||
"start:client": "cd uidashboard && npm run start", | |||
"start:server": "npm run compile && node -r dotenv/config dist/main.js dotenv_config_path=.env.default", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggesto to use npm-run-all so you can choose with the same tool to run tasks sequentially or in parallel. another option is to use task hooks (ie. "prestart:server")
const uidashboardPath = path.join( | ||
__dirname, | ||
'..', | ||
'..', | ||
'..', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to have a top level module / config object that exports the root directory path ie.
export rootDir = __dirname;
so you can use path.join(rootDir, "uidashboard", "build")
uidashboard/README.md
Outdated
@@ -0,0 +1,46 @@ | |||
# Getting Started with Create React App |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use dashes as separator for directory names ui-dashboard
uidashboard/README.md
Outdated
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `yarn eject` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we're using npm instead (I see there's a package.json-lock)
af1ed44
to
9902bc1
Compare
3e71ff9
to
d789d89
Compare
If startup time are crucial consider using vite instead of cra -> coryhouse/reactjsconsulting#139 |
@@ -23,6 +23,7 @@ | |||
"@types/express": "^4.17.16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to upload on the origin an updated version of the package-lock.json file, because if I run npm install
command, something changes in that file, but it shouldn't change anything
uidashboard/src/App.test.tsx
Outdated
|
||
test('renders learn react link', () => { | ||
render(<App />); | ||
const linkElement = screen.getByText(/learn react/i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test doesn't work, I'd remove it and then later we can think about how to make this kind of test
Co-authored-by: Marco Comi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍪
Add the dashboard that shows the recorded request-response pair
List of Changes
Add a sub-project
Change package.json to integrate the new project
Motivation and Context
We have to show a simple dashboard that returns the request-response pair handled by the mock.
How Has This Been Tested?
Manual check locally
Types of changes
Checklist: