Skip to content

Instantly share code, notes, and snippets.

View chiwent's full-sized avatar
:octocat:
Focusing

chiwent

:octocat:
Focusing
View GitHub Profile
@chiwent
chiwent / mini-express.js
Created October 18, 2018 15:03 — forked from Saul-Mirone/mini-express.js
Just An Express Style Framework
const http = require('http')
const url = require('url')
const path = require('path')
const fs = require('fs')
const mime = {
"html": "text/html",
"css": "text/css",
"js": "text/javascript",
"json": "application/json",
"gif": "image/gif",
@chiwent
chiwent / ajax.js
Last active October 18, 2018 13:24 — forked from yangfch3/ajax.js
ajax 请求封装
var Ajax = (function() {
var methodsList = ['get', 'post', 'head', 'options', 'put', 'connect', 'trace', 'delete'];
/**
* Ajax
* @param {String} url
* @param {Function} callback
* @param {Object/String} data
* @param {Object} options
*