1.2.3 • Published 6 years ago
snowframework v1.2.3
SNOWF
a simple nodeJS web framework
GET START
- npm install snowframework --save
- create appsetting.json in root dir, refer to following example
- create following dir: controller, views, wwwroot
- create new controller in controller dir and create new index.html in views dir
- cteate index.js in root dir, refer to following example
- excute > node index.js
index.js Example
//require snowframework
const app = require('snowframework');
const appsetting = require('./appsetting');
//init with appsetting.json
app.init(appsetting.snowf);
//add controller
app.addController('home', require('./controllers/homeController'));
app.addController('docs', require('./controllers/docsController'));
//start app
app.start();
appsetting.json Example
this file need snowf node
{
"snowf": {
"environment": "developments",
"port": "8089",
"router": {
"default": "home",
"error": "/shared/error.html",
"views": "./example/views",
"layout":"./example/views/shared",
"root": "./example/wwwroot"
}
}
}
environment : set the environment, if 'development', you will recive the debug info, else it will show the custom error page
port : the server port
default : default page
error : custom error page
views : views dir
layout: layout page dir
root : static resouce dir
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.0
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.2.7
6 years ago
0.2.6
6 years ago
0.2.5
6 years ago
0.2.4
6 years ago
0.2.3
7 years ago
0.2.2
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago