Node service or application template base on Koa 2.
This is a 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+
- ESLint
- ES modules
- Environment data config
- Local development server using nodemon
- Debug in VSCode
-
Add template
$ fbi add https://github.com/fbi-templates/fbi-project-mod.git
-
Create a project
$ cd path/to/empty-folder $ fbi init -o mod # or $ fbi init -o mod my-app
-
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/demo
$ 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
- Official templates
- fbi documentation
- Migrate from fbi-template-mod? Check this out.