This commit is contained in:
RainSun 2020-01-18 15:48:20 +08:00
parent 024c9d70ec
commit 4cb5c8b4de
4 changed files with 67 additions and 2 deletions

View File

@ -44,6 +44,7 @@
`export FLASK_APP=yiban.py`
`export FLASK_APP=qrcodeLi.py`
`export FLASK_APP=cust.py`
`export FLASK_ENV=development`
@ -70,7 +71,7 @@ timeout = 120
# accesslog = './logs/acess.log'
# errorlog = './logs/error.log'
# 自动重启
autostart = ture
autostart = True
```
启动gunicorn
@ -78,6 +79,7 @@ autostart = ture
`gunicorn qrcodeLi:app -c gunicornLi.conf`
`gunicorn qrcodeMe:app -c gunicornMe.conf`
`gunicorn yiban:app -c gunicorn.conf`
`gunicorn cust:app -c gunicorn.conf`
查询gunicorn

View File

@ -0,0 +1,32 @@
# javascript 学习总结
## 基础
* 输入`prompt(...)`
* 比较
* 如果两边任意一边出现 `true` 或者 `false` 使用 ===
* 如果两边任意一边可能是特定值`0,"", []` 使用 ===
* 剩下的所有情况,使用 ==
* 对于引用类型来说,比较仅仅是比较其引用是否是同一个,另外在和字符串比较时,数组会自动转成字符串
```js
var a = [1,2,3]
var b = [1,2,3]
var c = "1,2,3"
console.log(a == b) // false
console.log(a == c) // true
console.log(b == c) // true
```
* switch语句
```js
switch(a) {
case 2:
case 10:
// 2 或者 10 执行
break;
default:
// 条件都不满足默认执行
}
```
## ES6
* let 尽量将变量声明放在代码块开始,避免在(Temproal Dead Zone, TDZ)临时死亡区使用而报错
* 尽量使用for...let在每次循环中都会声明一个新的变量生成了一个闭包。避免for里边的函数在调用的时候引用不到正确的变量。

View File

@ -182,6 +182,30 @@ server {
}
}
server {
listen 80;
server_name cust.powerrain.cn;
# add_header Strict-Transport-Security "max-age=31536000";
# location / {
# root /data/yiban/yiban;
# index index.html index.htm;
# try_files $uri $uri/ /index.html;
# }
# location /api/photo/show/ {
# alias /data/yiban/backend/upload/;
# }
location /api {
proxy_pass http://127.0.0.1:5003;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /data/wwwroot;
}
}
server {
listen 80;
server_name powerrain.cn;

View File

@ -98,4 +98,11 @@ function Foo(who) {
var b1 = new Bar('b1')
var b2 = new Bar('b2')
b1.speak()
b2.speak()
b2.speak()
var a = [1,2,3]
var b = [1,2,3]
var c = "1,2,3"
console.log(a == b)
console.log(a == c)
console.log(b == c)