diff --git a/README.md b/README.md index 21cca8f..23b63c9 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,9 @@ npm install
## Step 7) Run it! -I didn't link them up into a single command, so you might need to open two shells +It's linked up into a single command, this starts the front and backend servers: ``` python main.py -cd frontend -npm start ``` Now you should be redirected to https://embed.demo.com:3000 where you should see an embeded dashboard diff --git a/frontend/package.json b/frontend/package.json index 2f967ca..2366aae 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,7 +4,6 @@ "private": true, "dependencies": { "@looker/embed-sdk": "^1.6.1", - "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", diff --git a/frontend/src/setupTests.js b/frontend/src/setupTests.js deleted file mode 100644 index 8f2609b..0000000 --- a/frontend/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/main.py b/main.py index 57e133e..dd2d42a 100644 --- a/main.py +++ b/main.py @@ -2,6 +2,7 @@ from fastapi import FastAPI, Request import uvicorn from fastapi.middleware.cors import CORSMiddleware +import subprocess app = FastAPI() from auth import generateUrlLocally, urlFromLookerAPI @@ -29,7 +30,9 @@ def auth_from_api(request: Request,src:str=""): userToken = request.headers.get('usertoken') return urlFromLookerAPI(src, userToken) + if __name__ == '__main__': + subprocess.Popen("cd frontend; npm start", shell=True) uvicorn.run( 'main:app', port=8000, host='0.0.0.0', reload=True,