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
oryarn global add fbi
fbi v3.0+
node v7.6+
- 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)
-
Show available tasks
$ fbi ls
-
Run a task
$ fbi s # Start dev server $ fbi b # Build the project for the specified environment
-
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
$ curl -i http://localhost:3000/api/pullUsers?num_of_users=12
$ npm start
- Description: Compile and start development server.
- Params:
d
{Boolean}
'watch only' mode.
- Alias:
s
- Examples:
fbi s
fbi s -d
- 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
check out fbi-task-pack