Update README.md

This commit is contained in:
Marcin Gębala 2019-06-19 18:04:50 +02:00 committed by GitHub
parent 80371c0c56
commit b1d9a0a41a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,23 +1,57 @@
### Before you do anything # Saleor Dashboard
Run following command to install dependencies: ## Getting Started
`npm i`
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- Node.js 10.0+
- A running instance of [Saleor](https://github.com/mirumee/saleor/).
### Installing
Clone the repository:
```
git clone git@github.com:mirumee/saleor-dashboard.git
```
Enter the project directory:
```
cd saleor-dashboard
```
Install NPM dependencies:
```
npm i
```
### Configuration ### Configuration
You'll need to set `APP_MOUNT_URI` and `API_URI` environment variables. There are two environment variables available for configuration:
Example:
`APP_MOUNT_URI=/` and `API_URI=http://localhost:8000/graphql/` will mount - `API_URI` (required) - URI of a running instance of Saleor GraphQL API.
dashboard at `localhost:9000/` and set API URI to `http://localhost:8000/graphql/`. If you are running Saleor locally with the default settings, set `API_URI` to: `http://localhost:8000/`.
This is default config if you start Saleor at port 8000. Setting `APP_MOUNT_URI`
to `/dashboard/` will mount app at `localhost:9000/dashboard/`. - `APP_MOUNT_URI` - URI at which the Dashboard app will be mounted.
E.g. if you set `APP_MOUNT_URI` to `/dashboard/`, your app will be mounted at `http://localhost:9000/dashboard/`.
### Development ### Development
Start development server by running following command: To start the development server run:
`npm start`
```
npm start
```
### Production ### Production
Build application bundle by running following command: To build the application bundle run:
`npm run build`
```
npm run build
```