質問編集履歴
1
package.jsonの内容等を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -25,3 +25,95 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
npm startの時と、npm run buildの時でサイトに違いがあるのでしょうか?
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
package.jsonの内容です。
|
34
|
+
|
35
|
+
```package.json
|
36
|
+
|
37
|
+
{
|
38
|
+
|
39
|
+
"name": "examplelocal",
|
40
|
+
|
41
|
+
"version": "0.1.0",
|
42
|
+
|
43
|
+
"private": true,
|
44
|
+
|
45
|
+
"dependencies": {
|
46
|
+
|
47
|
+
"moment": "^2.19.2",
|
48
|
+
|
49
|
+
"react": "^16.1.1",
|
50
|
+
|
51
|
+
"react-bootstrap": "^0.31.5",
|
52
|
+
|
53
|
+
"react-datetime": "^2.11.0",
|
54
|
+
|
55
|
+
"react-dom": "^16.1.1",
|
56
|
+
|
57
|
+
"react-router-dom": "^4.2.2",
|
58
|
+
|
59
|
+
"react-scripts": "1.0.17"
|
60
|
+
|
61
|
+
},
|
62
|
+
|
63
|
+
"scripts": {
|
64
|
+
|
65
|
+
"start": "react-scripts start",
|
66
|
+
|
67
|
+
"build": "react-scripts build",
|
68
|
+
|
69
|
+
"test": "react-scripts test --env=jsdom",
|
70
|
+
|
71
|
+
"eject": "react-scripts eject"
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
```
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
example.localはローカルのnginxでアクセスしています。
|
82
|
+
|
83
|
+
```example.local.conf
|
84
|
+
|
85
|
+
server {
|
86
|
+
|
87
|
+
listen 80;
|
88
|
+
|
89
|
+
server_name example.local;
|
90
|
+
|
91
|
+
root /home/examplelocal/examplelocal/build/;
|
92
|
+
|
93
|
+
index index.php index.html index.htm;
|
94
|
+
|
95
|
+
client_max_body_size 99M;
|
96
|
+
|
97
|
+
server_tokens off;
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
location ~ .php$ {
|
102
|
+
|
103
|
+
fastcgi_pass 127.0.0.1:9000;
|
104
|
+
|
105
|
+
fastcgi_index index.php;
|
106
|
+
|
107
|
+
fastcgi_param SCRIPT_FILENAME /home/examplelocal/examplelocal/build$fastcgi_script_name;
|
108
|
+
|
109
|
+
include fastcgi_params;
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
```
|