mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
This commit is contained in:
parent
6e464a1342
commit
a5890623c4
@ -69,7 +69,7 @@ Environment variables accepted in `server` mode:
|
||||
5. `CONSOLE_MODE`: `server`
|
||||
6. `URL_PREFIX`: `/` (forward slash)
|
||||
|
||||
> The server also templates `consolePath` in `window.__env` which is the relative path of the current page (something like `/console/data/schema/public`). Using this path, the console determines the DATA_API_URL. You do not need to worry about this in development since you are hardcoding the value of DATA_API_URL in `.env`.
|
||||
> The server also templates `consolePath` in `window.__env` which is the relative path of the current page (something like `/console/data/schema/public`). Using this path, the console determines the DATA_API_URL. You do not need to worry about this in development since you are hardcoding the value of DATA_API_URL in `.env`.
|
||||
|
||||
#### Run Development Server:
|
||||
|
||||
|
@ -8,8 +8,26 @@ own machine and how to contribute.
|
||||
- [stack](https://docs.haskellstack.org/en/stable/README/#how-to-install)
|
||||
- A Postgres server (Recommended: Use docker to run a local postgres instance)
|
||||
- GNU Make (optional)
|
||||
- npm
|
||||
- [Node.js](https://nodejs.org/en/) (v8.9+)
|
||||
- libpq-dev
|
||||
- psql
|
||||
- python >= 3.7 with pip3
|
||||
|
||||
## Upgrading npm
|
||||
|
||||
If your npm is too old (< 5.7),
|
||||
|
||||
npm install -g npm@latest
|
||||
|
||||
or
|
||||
|
||||
sudo npm install -g npm@latest
|
||||
|
||||
or update your nodejs
|
||||
|
||||
## Getting pip3
|
||||
|
||||
sudo apt install python3-pip
|
||||
|
||||
## Development workflow
|
||||
|
||||
@ -36,6 +54,29 @@ own machine and how to contribute.
|
||||
- Create a database on postgres
|
||||
- Run the binary: `stack exec graphql-engine -- --database-url=<database-url> serve`
|
||||
|
||||
database url looks like: `postgres://<username>:<password>@<host>:<port>/<dbname>`
|
||||
|
||||
### Running Postgres
|
||||
|
||||
The easiest way is to run docker in a container
|
||||
|
||||
````
|
||||
docker run -p 5432:5432 -d postgres:11.1
|
||||
````
|
||||
|
||||
Test if it's running by
|
||||
|
||||
telnet localhost 5432
|
||||
|
||||
### psql
|
||||
|
||||
You will need psql or another client
|
||||
|
||||
````
|
||||
sudo apt install postgresql-client
|
||||
````
|
||||
|
||||
|
||||
### Work
|
||||
- Work on the feature/fix
|
||||
- Add test cases if relevant
|
||||
|
Loading…
Reference in New Issue
Block a user