Git Product home page Git Product logo

fbi-mod-practice's Introduction

fbi-practice with fbi-project-mod

A practice about user management moddleware which uses fbi-project-mod and it works with fbi-project-vue.

This node service base on Koa 2.

This is an fbi project template. If you haven't installed fbi yet, use the following command to install.

$ npm i -g fbi or yarn global add fbi

Requirements

  • fbi v3.0+
  • node v7.6+

Features

  • Using Koa2 to build the APIs
  • Providing api for users to pull some user datas (Each data is generated randomly)
  • Providing api for users to edit user data (Virtually operation)
  • Providing api for users to remove user data (Virtually operation)

Usage

  1. Show available tasks

    $ fbi ls
  2. Run a task

    $ fbi s   # Start dev server
    $ fbi b   # Build the project for the specified environment
  3. Debug in VSCode

    # 1. Start dev server
    $ fbi s
    
    # 2. Attach existing process:
    Press `F5` in VSCode (support breakpoints in `src`)
  • Update template

    $ fbi up mod
  • Update project

    $ cd path/to/my-app
    $ fbi use vx.x.x  # use `fbi ls store` to check versions
  • Update options

    $ cd path/to/my-app
    $ fbi init -o

Test

$ curl -i http://localhost:3000/api/pullUsers?num_of_users=12

Run the project in a production environment

$ npm start

Tasks

serve

  • Description: Compile and start development server.
  • Params:
    • d {Boolean} 'watch only' mode.
  • Alias: s
  • Examples:
    • fbi s
    • fbi s -d

build

  • Description: Build the project for the specified environment.
  • Params:
    • p/prod {Boolean} (default) Production environment.
    • t/test {Boolean} Test environment.
  • Alias: b
  • Examples:
    • fbi b -t
    • fbi b -p

Need file packaging?

check out fbi-task-pack

More

License

MIT

fbi-mod-practice's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.