specify needed node version, clarify setup instructions (close #1754) (#1815)

This commit is contained in:
Shahidh K Muhammed 2019-03-19 10:42:50 +05:30 committed by GitHub
parent 6e464a1342
commit a5890623c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 2 deletions

View File

@ -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:

View File

@ -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