Promise based HTTP client for the browser and node.js


create project and download deps.

vue create hello_mockjs
cd hello_mockjs 
npm install mockjs

npm run serve


Random is a useful nodejs commandline / library for generating random objects, like url, email, etc.

npm install random -g 
➜  hello_mockjs git:(master) ✗ random

  Usage: random [options] [command]


    -V, --version  output the version number
    -h, --help     output usage information


    boolean        Random.boolean( min,  max,  cur )
    bool           Random.bool( min,  max,  cur )
    natural        Random.natural( min,  max )
    integer        Random.integer( min,  max )
    int   min,  max )
    float          Random.float( min,  max,  dmin,  dmax )
    character      Random.character( pool )
    char           Random.char( pool )
    string         Random.string( pool,  min,  max )
    str            Random.str()
    range          Random.range( start,  stop,  step )
    date  format )
    time           Random.time( format )
    datetime       Random.datetime( format )
    now   unit,  format )
    image          Random.image( size,  background,  foreground,  format,  text )
    img            Random.img()
    color          Random.color( name )
    hex            Random.hex()
    rgb            Random.rgb()
    rgba           Random.rgba()
    hsl            Random.hsl()
    paragraph      Random.paragraph( min,  max )
    cparagraph     Random.cparagraph( min,  max )
    sentence       Random.sentence( min,  max )
    csentence      Random.csentence( min,  max )
    word           Random.word( min,  max )
    cword          Random.cword( pool,  min,  max )
    title          Random.title( min,  max )
    ctitle         Random.ctitle( min,  max )
    first          Random.first()
    last           Random.last()
    name  middle )
    cfirst         Random.cfirst()
    clast          Random.clast()
    cname          Random.cname()
    url            Random.url( protocol,  host )
    protocol       Random.protocol()
    domain         Random.domain( tld )
    tld            Random.tld()
    email domain )
    ip             Random.ip()
    region         Random.region()
    province       Random.province()
    city  prefix )
    county         Random.county( prefix )
    zip   len )
    d4             Random.d4()
    d6             Random.d6()
    d8             Random.d8()
    d12            Random.d12()
    d20            Random.d20()
    d100           Random.d100()
    guid           Random.guid()
    uuid           Random.uuid()

    $ random date yyyy-MM-dd
    $ random time HH:mm:ss



每一个 Vuex 应用的核心就是 store(仓库)。“store”基本上就是一个容器,它包含着你的应用中大部分的状态 (state)。