saleor-dashboard/README.md

62 lines
1.3 KiB
Markdown
Raw Normal View History

2019-06-19 16:04:50 +00:00
# Saleor Dashboard
2019-06-19 14:40:52 +00:00
2019-06-19 16:09:48 +00:00
![1 copy 2x](https://user-images.githubusercontent.com/5421321/47799917-8afd7a00-dd2b-11e8-88c7-63588e25bcea.png)
A GraphQL-powered, single-page dashboard application for [Saleor](https://github.com/mirumee/saleor/).
2019-06-19 16:04:50 +00:00
## 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:
```
2019-06-19 16:06:12 +00:00
$ git clone git@github.com:mirumee/saleor-dashboard.git
2019-06-19 16:04:50 +00:00
```
Enter the project directory:
```
2019-06-19 16:06:12 +00:00
$ cd saleor-dashboard
2019-06-19 16:04:50 +00:00
```
Install NPM dependencies:
```
2019-06-19 16:06:12 +00:00
$ npm i
2019-06-19 16:04:50 +00:00
```
2019-06-19 14:40:52 +00:00
2019-06-19 15:41:42 +00:00
### Configuration
2019-06-19 14:40:52 +00:00
2019-06-19 16:04:50 +00:00
There are two environment variables available for configuration:
- `API_URI` (required) - URI of a running instance of Saleor GraphQL API.
2019-08-20 10:49:27 +00:00
If you are running Saleor locally with the default settings, set `API_URI` to: `http://localhost:8000/graphql/`.
2019-06-19 16:04:50 +00:00
- `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/`.
2019-06-19 14:40:52 +00:00
2019-06-19 15:41:42 +00:00
### Development
2019-06-19 14:40:52 +00:00
2019-06-19 16:04:50 +00:00
To start the development server run:
```
2019-06-19 16:06:12 +00:00
$ npm start
2019-06-19 16:04:50 +00:00
```
2019-06-19 14:40:52 +00:00
2019-06-19 15:41:42 +00:00
### Production
2019-06-19 14:40:52 +00:00
2019-06-19 16:04:50 +00:00
To build the application bundle run:
```
2019-06-19 16:06:12 +00:00
$ npm run build
2019-06-19 16:04:50 +00:00
```