wind-mvc

0.0.6 • Public • Published

wind-mvc

this is a simple mvc framework.

Installation

$ npm install wind-mvc
$ node app.js

then, you can access like: (similarly struts rules)

main configuration file

lib/config.js

/**
* gloabl configuration
**/
module.exports = {
	/**
	* server port
	**/
	port: 8080,
	
	uploadDir :'./uploadfile/'
};

lib/url-config.js

/**
*  url map the module of the action
**/

module.exports = {
	'/ajax': {
		path: './action/ajax.js',
		results: {
			'success': './static/start/index.html'
		}
	},
	'/register': {
		path: './action/register.js',
		results: {
			'success': './static/form/form.html'
		}
	},
	'/server': {
		path: './action/serverSent.js',
		results: {
			'success': './static/server/server-sent.html'
		}
	},
	'/fileUpload': {
		path: './action/fileUpload.js',
		results: {
			success: './static/form/fileUploadWithProgress.html'
		}
	}
};

Readme

Keywords

Package Sidebar

Install

npm i wind-mvc

Weekly Downloads

0

Version

0.0.6

License

BSD

Last publish

Collaborators

  • wind-hao