Skip to content

Commit

Permalink
Merge pull request #138 from MCS-Lite/docs/update-readme
Browse files Browse the repository at this point in the history
Docs(README): add detailed build procedure..
  • Loading branch information
dariachen authored May 23, 2017
2 parents f437355 + becbbd1 commit 7767b70
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 22 deletions.
70 changes: 70 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# MCS Lite Application
## How to Build from Source Code
### Prerequisite

* You must have **Node.js** version >= 6 and **npm** installed on your environment.

### Steps
Go to the **mcs-lite-app** folder and use the following commands in your terminal to build the packages for supported platforms:

* Build web UI related projects.

```
// in mcs-lite-app/client folder
$ cd client && npm install && npm run build:global
$ cd ..
```

* Build nwjs package.

```
// in mcs-lite-app folder
$ npm install && npm run build:global
```

* Get the mcs-lite-app packages for each platform.

```
// in mcs-lite-app/out/mcs-lite-app folder
$ cd ./out/mcs-lite-app
```

* Launch **mcs-lite-app** executable file to run MCS Lite platform and access the Admin Console.
* Open browser and go to http://localhost:3000 or http://$yourIPAddress:3000 for web console.


## How to Setup Development Environment
### Prerequisite

* You must have **Node.js** version >= 6 and **npm** installed on your environment.
* You must have **nwjs** installed on your environment. You can simply run the **install.sh** attached in the source code.

### Steps
* Clone this repo

```
$ git clone https://github.com/MCS-Lite/mcs-lite-app.git
```

* Modify the code.
* Build and run RESTful server.

```
$ npm install && npm run watch:global
$ NODE_ENV=dev node server
```
* Build web UI related packages.

```
$ cd client && npm run watch:global
```

If you want to build web UI related packages with unit test, you can use

```
$ cd client && npm run test:watch
```

* Open browser and go to `http://localhost:8081` (don't use 127.0.0.1) for web console.

45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
# mcs-lite-app [![Travis][build-badge]][build] [![Github Tag][githubTag-badge]][githubTag] [![codecov](https://codecov.io/gh/MCS-Lite/mcs-lite-app/branch/master/graph/badge.svg)](https://codecov.io/gh/MCS-Lite/mcs-lite-app) [![Greenkeeper badge](https://badges.greenkeeper.io/MCS-Lite/mcs-lite-app.svg)](https://greenkeeper.io/)
# MCS Lite Application
An on-premises IoT Cloud Platform.

> Note: Common UI and Mobile page are being developed at https://github.com/MCS-Lite/mcs-lite.
[![Travis][build-badge]][build] [![Github Tag][githubTag-badge]][githubTag] [![codecov](https://codecov.io/gh/MCS-Lite/mcs-lite-app/branch/master/graph/badge.svg)](https://codecov.io/gh/MCS-Lite/mcs-lite-app) [![Greenkeeper badge](https://badges.greenkeeper.io/MCS-Lite/mcs-lite-app.svg)](https://greenkeeper.io/)

## For Usage
* please go to [here](https://github.com/MCS-Lite/mcs-lite-app/releases), and download your application
> Note: Common UI and Mobile page are being developed at https://github.com/MCS-Lite/mcs-lite.
### Linux or other Server
* `node server`
## Download Binaries
* You can always get the latest release from [GitHub Releases](https://github.com/MCS-Lite/mcs-lite-app/releases).

## For Dev

### Env
## Get Started
* Launch **mcs-lite-app** executable file to run MCS Lite platform and access the Admin Console.
![](./docs/images/mcs_lite_app_launch.png)
* Open browser and go to http://mcs_lite_server_IP:3000 for web console to manage your devices.
![](./docs/images/mcs_lite_console.png)

* Only support Node.js version >= 6
## Features
1. **Remote control** your device from MCS Lite console
![](./docs/images/mcs_remote_control_onoff.gif)
2. **Collect and visualize data** from your devices.
![](./docs/images/mcs_lite_data_upload.png)
3. **Manage your devices**.
![](./docs/images/device_management.png)

#### Run restful server
* `NODE_ENV=dev node server`

#### Run mcs lite client
* `cd client && npm run watch:global`
* go to `http://localhost:8081` (don't use 127.0.0.1)
* If you want to build production version: `npm run build:global` (under /client path).
## Appendix
### MCS Lite Introduction
For more detailed information, please refer to [MCS Lite Introduction](http://mcs-lite-introduction.netlify.com/). But there is only Traditional Chinese version available at this moment.

## For Testing

```
$ npm run test:watch
```

## Gzip

### Gzip
[Express compression middleware](https://github.com/expressjs/compression#expressconnect) is enabled by default. If you want to disable it, set `GZIP_DISABLE` to `true`.

```
$ NODE_ENV=prod GZIP_DISABLE='true' node server
```


[build-badge]: https://img.shields.io/travis/MCS-Lite/mcs-lite-app/master.svg?style=flat-square
[build]: https://travis-ci.org/MCS-Lite/mcs-lite-app
[githubTag-badge]: https://img.shields.io/github/tag/MCS-Lite/mcs-lite-app.svg?style=flat-square
Expand Down
Binary file added docs/images/device_management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mcs_lite_app_launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mcs_lite_console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mcs_lite_data_upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mcs_remote_control_onoff.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7767b70

Please sign in to comment.