laconic-console/packages/console-client/README.md

48 lines
788 B
Markdown
Raw Normal View History

2020-05-23 18:36:15 +00:00
# Console
Apollo GraphQL client.
## Usage
2020-05-26 02:16:25 +00:00
First start the server:
2020-05-23 18:36:15 +00:00
```bash
2020-05-26 02:16:25 +00:00
cd packages/consoe-server
2020-05-23 18:36:15 +00:00
yarn start
```
2020-05-26 02:16:25 +00:00
Then start the Webpack devserver.
```bash
cd packages/consoe-client
yarn start
```
2020-05-23 18:36:15 +00:00
2020-05-26 02:16:25 +00:00
Then load the app: http://localhost:8080.
2020-05-23 18:36:15 +00:00
## Deploy
```bash
yarn build
```
This creates the following folders:
```
/dist
/es # Module imports.
/production # Production build.
```
NOTE: GQL and Production files and exported and may be used by the server.
```javascript
2020-05-24 13:55:36 +00:00
import QUERY_STATUS from '@dxos/console-client/gql/system_status.graphql';
2020-05-23 18:36:15 +00:00
import config from '@dxos/console-client/config.json';
...
const file = path.join(__dirname + '../../../../node_modules/@dxos/console-client/dist/production', 'index.html');
res.sendFile(file);
```