Skip to content

Commit b292c12

Browse files
author
Russ Garner
committed
front and backend servers one call
1 parent e70a524 commit b292c12

4 files changed

Lines changed: 4 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ npm install
4343
<br/>
4444

4545
## Step 7) Run it!
46-
I didn't link them up into a single command, so you might need to open two shells
46+
It's linked up into a single command, this starts the front and backend servers:
4747
```
4848
python main.py
49-
cd frontend
50-
npm start
5149
```
5250

5351
Now you should be redirected to https://embed.demo.com:3000 where you should see an embeded dashboard

frontend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"private": true,
55
"dependencies": {
66
"@looker/embed-sdk": "^1.6.1",
7-
"@testing-library/jest-dom": "^5.16.4",
87
"@testing-library/react": "^13.3.0",
98
"@testing-library/user-event": "^13.5.0",
109
"react": "^18.2.0",

frontend/src/setupTests.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from fastapi import FastAPI, Request
33
import uvicorn
44
from fastapi.middleware.cors import CORSMiddleware
5+
import subprocess
56
app = FastAPI()
67
from auth import generateUrlLocally, urlFromLookerAPI
78

@@ -29,7 +30,9 @@ def auth_from_api(request: Request,src:str=""):
2930
userToken = request.headers.get('usertoken')
3031
return urlFromLookerAPI(src, userToken)
3132

33+
3234
if __name__ == '__main__':
35+
subprocess.Popen("cd frontend; npm start", shell=True)
3336
uvicorn.run(
3437
'main:app', port=8000, host='0.0.0.0',
3538
reload=True,

0 commit comments

Comments
 (0)