Update README.md
This commit is contained in:
parent
80371c0c56
commit
b1d9a0a41a
1 changed files with 47 additions and 13 deletions
60
README.md
60
README.md
|
@ -1,23 +1,57 @@
|
|||
### Before you do anything
|
||||
# Saleor Dashboard
|
||||
|
||||
Run following command to install dependencies:
|
||||
`npm i`
|
||||
## Getting Started
|
||||
|
||||
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
|
||||
|
||||
You'll need to set `APP_MOUNT_URI` and `API_URI` environment variables.
|
||||
Example:
|
||||
`APP_MOUNT_URI=/` and `API_URI=http://localhost:8000/graphql/` will mount
|
||||
dashboard at `localhost:9000/` and set API URI to `http://localhost:8000/graphql/`.
|
||||
This is default config if you start Saleor at port 8000. Setting `APP_MOUNT_URI`
|
||||
to `/dashboard/` will mount app at `localhost:9000/dashboard/`.
|
||||
There are two environment variables available for configuration:
|
||||
|
||||
- `API_URI` (required) - URI of a running instance of Saleor GraphQL API.
|
||||
If you are running Saleor locally with the default settings, set `API_URI` to: `http://localhost:8000/`.
|
||||
|
||||
- `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
|
||||
|
||||
Start development server by running following command:
|
||||
`npm start`
|
||||
To start the development server run:
|
||||
|
||||
```
|
||||
npm start
|
||||
```
|
||||
|
||||
### Production
|
||||
|
||||
Build application bundle by running following command:
|
||||
`npm run build`
|
||||
To build the application bundle run:
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue