You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Redis for Windows](https://github.com/microsoftarchive/redis/releases)
39
42
40
43
## INIT DATABASE
41
44
45
+
Create a MySQL user, e.g.
42
46
```shell
43
-
$ code-push-server-db init --dbhost "your mysql host" --dbport "your mysql port" --dbuser "your mysql user" --dbpassword "your mysql password"
47
+
CREATE USER 'codepush'@'localhost' IDENTIFIED BY 'create_a_password';
48
+
```
49
+
50
+
Grant appropriate permissions, e.g.
51
+
```shell
52
+
GRANT ALL PRIVILEGES ON codepush .* TO 'codepush'@'localhost';
53
+
```
54
+
55
+
Full command
56
+
```shell
57
+
$ code-push-server-db init --dbhost "your mysql host" --dbport "your mysql port" --dbname "your database" --dbuser "your mysql user" --dbpassword "your mysql password"
58
+
```
59
+
60
+
Defaults (if omitted) are:
61
+
| dbhost | localhost |
62
+
| dbport | 3306 |
63
+
| dbname | codepush |
64
+
| dbuser | root |
65
+
66
+
Minimally
67
+
```shell
68
+
$ code-push-server-db init --dbpassword "your mysql root password"
44
69
```
45
70
46
71
or from source code
47
72
48
73
```shell
49
-
$ ./bin/db init --dbhost "your mysql host" --dbport "your mysql port" --dbuser "your mysql user" --dbpassword "your mysql password"
74
+
$ ./bin/db init --dbhost "your mysql host" --dbport "your mysql port"--dbname "your database" --dbuser "your mysql user" --dbpassword "your mysql password"
50
75
```
51
76
52
77
> output: success
53
78
54
79
## CONFIGURE for code-push-server
55
80
56
-
save the file [config.js](https://github.com/byronigoe/code-push-server/blob/master/config/config.js)
57
-
58
-
some config have to change:
81
+
Save the file [config.js](https://github.com/byronigoe/code-push-server/blob/master/config/config.js) and modify the properties, or set the corresponding environment variables (e.g. in process.json).
59
82
60
-
-`local`.`storageDir` change to your directory,make sure have read/write permissions.
61
-
-`local`.`downloadUrl` replace `127.0.0.1` to your machine ip.
62
-
-`common`.`dataDir` change to your directory,make sure have read/write permissions.
63
-
-`jwt`.`tokenSecret` get the random string from `https://www.grc.com/passwords.htm`, and replace the value `INSERT_RANDOM_TOKEN_KEY`.
64
-
-`db` config: `username`,`password`,`host`,`port` change your own's
83
+
-`local`.`storageDir` change to your directory, make sure you have read/write permissions.
84
+
-`local`.`downloadUrl` replace `127.0.0.1` to your machine's IP.
85
+
-`common`.`dataDir` change to your directory, make sure you have read/write permissions.
86
+
-`jwt`.`tokenSecret` get a random string from `https://www.grc.com/passwords.htm`, and replace the value `INSERT_RANDOM_TOKEN_KEY`.
87
+
-`db` config: `username`,`password`,`host`,`port` set the environment variables, or change them in this file.
88
+
-`smtpConfig` config: `host`,`auth.user`,`auth.pass` needed if you enable `common.allowRegistration`
65
89
66
90
## CONFIGURE for pm2
67
91
68
-
save the file [process.json](https://github.com/byronigoe/code-push-server/blob/master/docs/process.json)
92
+
Save the file [process.json](https://github.com/byronigoe/code-push-server/blob/master/process.json)
69
93
70
-
some config have to change:
94
+
Some configuration properties have to change:
71
95
72
96
-`script` if you install code-push-server from npm use `code-push-server`, or use `"your source code dir"/bin/www`
73
-
-`CONFIG_FILE`above config.js file path, use absolute path.
97
+
-`CONFIG_FILE`absolute path to the config.js you downloaded.
0 commit comments