3
3
[ ![ Max OSX and Linux] ( https://travis-ci.org/clarkdo/hare.svg?branch=master )] ( https://travis-ci.org/clarkdo/hare )
4
4
[ ![ Windows] ( https://ci.appveyor.com/api/projects/status/16eua6xnlnwxqomp?svg=true )] ( https://ci.appveyor.com/project/clarkdo/hare )
5
5
[ ![ Vulnerabilities] ( https://snyk.io/test/github/clarkdo/hare/badge.svg )] ( https://snyk.io/test/github/clarkdo/hare )
6
+ [ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-standard-brightgreen.svg )] ( https://standardjs.com )
7
+ [ ![ ESLint] ( https://img.shields.io/badge/styled_with-eslint-blue.svg?colorB=8080f2 )] ( https://github.com/eslint/eslint )
6
8
[ ![ Issues] ( https://img.shields.io/github/issues/clarkdo/hare.svg )] ( https://github.com/clarkdo/hare/issues )
7
9
[ ![ Stars] ( https://img.shields.io/github/stars/clarkdo/hare.svg )] ( https://github.com/clarkdo/hare/stargazers )
8
10
[ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/clarkdo/hare/master/LICENSE )
13
15
$ git clone
[email protected] :clarkdo/hare.git
14
16
$ cd hare
15
17
# install dependencies
16
- $ yarn install
18
+ $ yarn
17
19
```
18
20
19
21
## Usage
@@ -22,7 +24,7 @@ $ yarn install
22
24
23
25
``` bash
24
26
# serve with hot reloading at localhost:3000
25
- $ yarn run dev
27
+ $ yarn dev
26
28
```
27
29
28
30
Go to [ http://localhost:3000 ] ( http://localhost:3000 )
@@ -31,31 +33,31 @@ Go to [http://localhost:3000](http://localhost:3000)
31
33
32
34
``` bash
33
35
# configure ESLint as a tool to keep codes clean
34
- $ yarn run lint
36
+ $ yarn lint
35
37
# use ava as testing framework, mixed with jsdom
36
- $ yarn run test
38
+ $ yarn test
37
39
```
38
40
39
41
### Production
40
42
41
43
``` bash
42
44
# build for production and launch the server
43
- $ yarn run build
44
- $ yarn run start
45
+ $ yarn build
46
+ $ yarn start
45
47
```
46
48
47
49
### Generate
48
50
49
51
``` bash
50
52
# generate a static project
51
- $ yarn run generate
53
+ $ yarn generate
52
54
```
53
55
54
56
### Analyze
55
57
56
58
``` bash
57
59
# build and launch the bundle analyze
58
- $ yarn run analyze
60
+ $ yarn analyze
59
61
```
60
62
61
63
### Use PM
@@ -88,7 +90,21 @@ $ pm2 delete hare
88
90
``` bash
89
91
# build image
90
92
$ docker build -t hare-dev -f Dockerfile.dev ./
91
- $ docker run -d -p 8888:3000 --env HOST=0.0.0.0 hare-dev
93
+ $ docker run -d -p 8888:3000 -e HOST=0.0.0.0 hare-dev
94
+ ```
95
+
96
+ ### Docker Production
97
+
98
+ ``` bash
99
+ # build bundle
100
+ $ export NODE_ENV=' '
101
+ $ yarn
102
+ $ yarn build
103
+ # install production dependencies (remove devDependencies)
104
+ $ yarn --prod
105
+ # build image
106
+ $ docker build -t hare-prod -f Dockerfile ./
107
+ $ docker run -d -p 8889:3000 -e HOST=0.0.0.0 hare-prod
92
108
```
93
109
94
110
Go to [ http://localhost:8888 ] ( http://localhost:8888 )
0 commit comments