You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If prefered, SQLPad can be installed as a global module using the local files in this repo. This allows running SQLPad via the cli in any directory, just as if you had installed it with `npm install sqlpad -g`
A docker image may be built using the Dockerfile located in `server` directory. See `docker-publish.sh` for example docker build command.
64
+
29
65
## Development
30
66
31
-
* Clone/download this repo
32
-
* Install node 8 or later ([nvm recommended](https://github.com/creationix/nvm))
33
-
* Ensure you have the latest npm
67
+
- Clone/download this repo
68
+
- Install node 8 or later ([nvm recommended](https://github.com/creationix/nvm))
69
+
- Ensure you have the latest npm
34
70
35
71
```sh
36
72
npm install npm -g
37
73
```
38
74
39
-
* Install dependencies (front and back)
75
+
- Install dependencies and build the UI
40
76
41
77
```sh
42
-
npm ci --prefix client
43
-
npm ci
78
+
scripts/build.sh
44
79
```
45
80
46
-
* Build front-end
81
+
- Open 2 terminal sessions in the root of this repo.
82
+
83
+
In one install the backend dependencies and start the development server
47
84
48
85
```sh
49
-
npm run build
86
+
npm start --prefix server
50
87
```
51
88
52
-
* Start dev server
89
+
In the other install frontend dependencies and start the devleopment server
53
90
54
91
```sh
55
-
npm start
92
+
npm start --prefix client
56
93
```
57
94
58
-
At this point you should have both back-end and front-end development servers running.
95
+
At this point you should have both backend and frontend development servers running.
59
96
60
-
http://localhost:3000 serves react front-end in dev-mode
61
-
http://localhost:3010 serves front-end compiled for production
97
+
http://localhost:3000 serves React-based frontend in dev-mode
98
+
http://localhost:3010 serves frontend compiled for production
62
99
63
-
When viewing the front end in development mode, the page will automatically refresh on front-end file change. The back-end server will always auto-restart on file change.
100
+
When viewing the frontend in development mode, the page will automatically refresh on frontend file change. The backend server will auto-restart on backend file change.
64
101
65
-
### Databases
102
+
### Optional step
66
103
67
104
A docker-compose file with is provided to provide an empty postgres database to test with.
68
-
If you have docker installed you can do the following:
105
+
If you have docker installed, in a third terminal session you can do the following:
69
106
70
107
```sh
71
108
# Bring database containers up in background
109
+
docker-compose up
110
+
111
+
# control-c will stop the databases in docker compose
112
+
113
+
# If you would like to run this in the background, run
0 commit comments