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:
|
## 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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue