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
Copy file name to clipboardExpand all lines: README.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Introduction
2
-
A plugin that deploys webpack bundles to server. It's useful when server ftp/sftp is forbidden or accessing server need pin + dynamic token.
2
+
A plugin that deploys webpack bundles to server. It's useful when server ftp/sftp is forbidden or accessing server need pin + dynamic token each time.
3
3
4
4
# Install
5
5
```
@@ -10,10 +10,11 @@ npm i deploy-server-webpack-plugin -D
10
10
11
11
**Client config**
12
12
13
-
You need config your webpack conf file like this:
13
+
Modify your webpack config file like below, change the "from" and "dest" fields according to your own project, "from" is based on webpack output dirname, "dest" means the path on server you want to push. token field validation need server side to cooperate.
Please copy ./server folder to you remote server somewhere, init the project and start it.
64
+
Copy ./server folder to you server machine somewhere, init the project and start it.
63
65
64
66
```
65
67
npm i
66
68
npm run start
67
69
```
68
70
Next config your nginx/apache to allow your node service can be accessed.
69
71
70
-
Try to visit "@your host/receiver" in browser, when you see "Method Not Allowed", it means node server started success, but 'GET' method is not allowed because we only config "POST" router to upload files.
72
+
Try to visit "@your host/receiver" in browser, when you see "Method Not Allowed", it means node server started success, but 'GET' method is not allowed because we only config "POST" router to upload files. Server code is based on Koa, change it according your demand.
71
73
72
74
# Options
73
75
@@ -78,7 +80,7 @@ Try to visit "@your host/receiver" in browser, when you see "Method Not Allowed"
78
80
|token|String|false|for security if needed|
79
81
80
82
# Others
81
-
Sometimes bundle files are too big and uploading appears "504 Gateay Time-out" error, enlarge client_max_body_size value in nginx.conf may solve this problem:
83
+
Sometimes bundle file is too big and uploading appears "504 Gateay Time-out" error, enlarge client_max_body_size value in nginx.conf may solve this problem:
0 commit comments