0.6.0-alpha • Published 8 months ago
spy-84-cms v0.6.0-alpha
spy-84-cms
Introduction
Be developed with core include express, sequelize, handlebars-express. You can use this CMS in the easy way
Structure
Your project
| app
|_ _http
|_ _ controllers
|_ _ middware
|_ models
|_ providers
|_ _ index.js
| bootstrap
|_ index.js
| configs
|_ app.js
|_ cache.js
|_ database.js
|_ index.js
|_ route.js
|_ view.js
| database
|_ migrations
|_ seeders
| modules // sample for division HMVC
|_ api_module01
|_ _ route.js
|_ module01
|_ _ route.js
| public
|_ storage
| resource
|_ views
|_ _ layout
|_ _ _ main.uniform
| routes
|_ api.js
|_ web.js
| .env
| loader.js
| server.js
Install
npm i spy-84-cms
Usage
Helper:
spy help
Generate structure by:
// create a new project npx spy init <name create project> //Be used to generate a model npx spy g model <Model Name | Model Path> | npx spy generate model <Model Name | Model Path> //Be used to generate a controller npx spy g controller <Controller Name | Controller Path> | npx spy generate controller <Controller Name | Controller Path> //Be used to generate a middleware npx spy g middleware <Middleware Name | Middleware Path> | npx spy generate middleware <Middleware Name | Middleware Path> //Be used to generate a migration npx spy g migration <Migration Name | Migration Path> | npx spy generate migration <Migration Name | Migration Path> //Be used to generate a seed npx spy g seed <Seed Name | Seed Path> | npx spy generate seed <Seed Name | Seed Path> //Be used to generate a module npx spy g module <Module Name | Module Path> | npx spy generate module <Module Name | Module Path>
Migration and seed structure by:
// Run migration npm run spy-migrate:up // Rollback migration npm run spy-migrate:undo // Run seed npm run spy-seed:all // Rollback seed npm run spy-seed:undo --seed name-of-seed-as-in-data // Rollback all seed npm run spy-seed:undo:all
Run by
npx spy go
or
npm start
or
node server.js
Special
Loader
All paths have been aggregated into file loader.json
{
"root": ".",
"app": "app",
"http": "app/http",
"controllers": "app/http/controllers",
"middleware": "app/http/middleware",
"models": "app/models"
}
Instead of using require('./../..'), you can use below functions Example:
const DemoController = controller('DemoController') // use for controllers
const DemoController = load('controllers', 'DemoController') // use when you want to load file flexibility
const PostModel = model('PostModel') // use for models
const AuthMiddleware = middleware('AuthMiddleware') // use for middleware
0.6.0-alpha
8 months ago
0.5.0-alpha
1 year ago
0.3.7-alpha
1 year ago
0.3.5-alpha
1 year ago
0.3.6-alpha
1 year ago
0.3.9-alpha
1 year ago
0.3.8-alpha
1 year ago
0.3.2-alpha
2 years ago
0.0.30-alpha
2 years ago
0.0.32-alpha
2 years ago
0.0.28-alpha
2 years ago
0.1.2-alpha
2 years ago
0.0.29-alpha
2 years ago
0.1.3-alpha
2 years ago
0.3.1-alpha
2 years ago
0.3.3-alpha
2 years ago
0.0.31-alpha
2 years ago
0.1.1-alpha
2 years ago
0.2.1-alpha
2 years ago
0.0.27-alpha
2 years ago
0.0.26-alpha
2 years ago
0.0.25-alpha
2 years ago
0.0.21
2 years ago
0.0.22
2 years ago
0.0.24
2 years ago
0.0.24-alpha
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.12
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago