0.0.23 • Published 4 years ago
create-express-backend v0.0.23
create-express-backend
Generator to scaffold Express backend projects using npm init express-backend
Usage
- Creating a new project
npm init express-backend
Run this command inside an empty folder
- Running a generator
npm init express-backend login:local
Run this command inside a folder with a previous generated project
- List available generators
npm init express-backend --list
Folder structure
src/index.js
- Entry point
src/init
- Main generator to init a new project
- Dispatched using:
npm init express-backend <folder>
src/generators
- Folder with all generators
- All generators must be registed in
src/generators/index.js
:
// src/generators/index.js
const login = require('./login')
module.exports = {
login,
}
- Example generator dispatched with:
npm init express-backend <generator-name>
src/generator/<generator>/<sub-generator>
- A generator can have sub-generators
- The generator folder must have an
index.js
file with all sub-generators registered:
// src/generator/login/index.js
const local = require('./local')
const oauth = require('./oauth')
module.exports = {
local,
oauth,
}
- The sub-generator can be dispatched with:
npm init express-backend <generator>:<sub-generator>
0.0.23
4 years ago
0.0.22
4 years ago
0.0.21
4 years ago
0.0.20
4 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.16
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago