Update frontend and deprecate yarn in favor of using npm
This commit is contained in:
@@ -58,7 +58,7 @@ https://www.exploit-db.com/google-hacking-database -->
|
||||
# restart the backend: ./launcher restart backend
|
||||
# stop the backend: ./launcher stop backend
|
||||
# kill the stack: ./launcher kill
|
||||
# generate UI api client: yarn client:gen (only works if the backend is running)
|
||||
# generate UI api client: npm run client:gen (only works if the backend is running)
|
||||
```
|
||||
- Frontend: [http://localhost:3000](http://localhost:3000)
|
||||
- Backend: [http://localhost:48997/](http://localhost:48997/)
|
||||
|
||||
3
frontend/.gitignore
vendored
3
frontend/.gitignore
vendored
@@ -19,6 +19,3 @@
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.yarn
|
||||
@@ -34,7 +34,7 @@
|
||||
2. Install the dependencies. From the `osintbuddy` directory run:
|
||||
```bash
|
||||
./launcher bootstrap
|
||||
# alternatively from the frontend directory try: yarn && yarn ui:dev
|
||||
# alternatively from the frontend directory try: npm install && npm run ui:dev
|
||||
```
|
||||
|
||||
3. From the `osintbuddy` directory, start the stack:
|
||||
@@ -43,7 +43,7 @@
|
||||
# restart the ui: ./launcher restart ui
|
||||
# stop the ui: ./launcher stop ui
|
||||
# kill the stack: ./launcher kill
|
||||
# generate api client: yarn client:gen (only works if the backend is up)
|
||||
# generate api client: npm run client:gen (only works if the backend is up)
|
||||
```
|
||||
- Frontend: [http://localhost:3000](http://localhost:3000)
|
||||
- Backend: [http://localhost:48997/](http://localhost:48997/)
|
||||
|
||||
11916
frontend/yarn.lock
11916
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,7 @@ services:
|
||||
ui:
|
||||
container_name: "ob_dev_ui"
|
||||
tty: true
|
||||
command: sh -c "cd /app/ && npm install && npm run ui:dev"
|
||||
env_file:
|
||||
- .env.alpha
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ version: "3.9"
|
||||
|
||||
services:
|
||||
ui:
|
||||
image: node:18-alpine
|
||||
command: sh -c "cd /app/ && yarn && yarn ui:dev"
|
||||
image: node:18.18.2-alpine3.18
|
||||
volumes:
|
||||
- ../frontend/:/app/
|
||||
ports:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
run_api_gen () {
|
||||
heading "Generating client SDK..."
|
||||
cd ../frontend && \
|
||||
yarn client:gen && \
|
||||
npm run client:gen && \
|
||||
success
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ setup_python_env() {
|
||||
|
||||
|
||||
setup_ui_env() {
|
||||
cd ../frontend/ && yarn install
|
||||
cd ../frontend/ && npm install
|
||||
info "Generate the UI API client with: ./launcher api:gen"
|
||||
cd "$OB_DIR"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ run_uidev() {
|
||||
export REACT_APP_CASDOOR_CLIENT_ID=$REACT_APP_CASDOOR_CLIENT_ID
|
||||
export REACT_APP_CASDOOR_ORG_NAME=$REACT_APP_CASDOOR_ORG_NAME
|
||||
export REACT_APP_CASDOOR_APP_NAME=$REACT_APP_CASDOOR_APP_NAME
|
||||
yarn ui:dev
|
||||
npm run ui:dev
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user