Skip to content

Instantly share code, notes, and snippets.

import axios from 'axios';
import qs from 'qs';
import store from '../store/index'
// axios 配置
axios.defaults.timeout = 30000;
axios.defaults.baseURL = '/';
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'; //这是一个ajax请求
// axios.defaults.headers['X-CSRF-TOKEN'] = $('meta[name="csrf-token"]').attr('content');
@hookover
hookover / api.md
Created August 18, 2018 04:39 — forked from holmberd/api.md
Product REST API CRUD Responses

Responses

POST /api/v1/products

success-status: 201

failure-status: 400 (bad request), 500

{
  id: 1,
@hookover
hookover / php-pools.md
Created August 18, 2018 04:38 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log