Skip to content

开发环境准备

开发工具

必装工具

推荐工具

若您有好的工具想推荐给大家,并出现在下面的清单中,可在企业微信中告知 姜军

在线工具

免费可商用图片素材

设计及开发过程中请使用免费可商用的图片素材站点找图片资源,避免造成图片侵权纠纷

前端开发必装

Java开发必装

Phython开发必装

开发环境

前端开发

  • VSCode环境

建议使用 VSCode 作为 js/vue 的编辑器,并安装以下插件 ESLint , EditorConfig for VSCode , Prettier - Code formatter , Prettier ESLint , Vetur。推荐 VSCode 工作区配置项:

json
  {
    "prettier.printWidth": 200,
    "prettier.singleQuote": true,
    "prettier.semi": false,
    "prettier.trailingComma": "none",
    "vetur.format.defaultFormatter.js": "prettier",
    "vetur.format.defaultFormatter.html": "prettyhtml",
    "vetur.format.defaultFormatterOptions": {
      "js-beautify-html": {
        "wrap_line_length": 200,
        "wrap_attributes": "auto",
        "end_with_newline": false
      },
      "prettyhtml": {
        "printWidth": 200,
        "singleQuote": false,
        "wrapAttributes": false,
        "sortAttributes": false
      }
    },
    "editor.codeActionsOnSave": {
        "source.fixAll": true
    },
    "search.exclude": {
      "**/node_modules/**": true,
      "**/dist/**": true,
      "**/bower_components": true,
      "**/*.code-search": true
    }
}
  • Nginx环境
conf
server {
        listen       80;
        server_name  localhost;
        # 网关
        location /gateway/ {
          proxy_pass https://x.x.x.x:36008/gateway/;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
        }
        # websocket
        location /ws/ {
          proxy_pass http://x.x.x.x:38003/;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
        }
        location /hydra/ {
          add_header Access-Control-Allow-Origin *;
          add_header Access-Control-Allow-Methods 'GET,POST,PUT,DELETE,OPTIONS';
          add_header Access-Control-Allow-Headers 'PARA_TOKEN, PARA_MTOKEN, PARA_VERSION, Origin, Authorization, console-category';
          # add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';

          if ($request_method = 'OPTIONS') {
            return 200;
          }

          proxy_pass http://x.x.x.x:36004/;
        }
        # 用户
        location /uss/ {
            proxy_http_version 1.1;
            proxy_pass http://user.stg.heckjj.com/;
            # proxy_pass https://user.heckjj.com/;
        }
        # 验证码
        location /verifyImg/console/ {
            proxy_pass https://statics.heckjj.com/console/;
        }
        # 前端工程
        location / {
            #index  index.html index.htm;
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
            add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
            
            # if ($request_method = 'OPTIONS') {
            # return 204;
            # }

            etag off;
            add_header Cache-Control "no-cache, no-store";
            proxy_pass http://localhost:8080;
	        #root "D:/GitRoot/SE/console/console-ui/dist/";
	        #try_files $uri $uri/ /index.html;
        }

    }

姜军的个人开发导航