神刀安全网

API architecture on NODE

RestOnNode

RESTful framework on NodeJS

This project is build using the same project archutecture which is followed by ASP.Net WebApi 2.0. That means it will be having controllers, authentication mechanism etc. to start with. All you need to do is create your own controllers.

Getting Started

How to install

npm install restonnode

How to Use

  • After downloading the project from npm, a package with name restonnode will be created inside node_modules folder.
  • Inside restonnode folder, create your controller file inside ./lib/controller folder. For reference, follow LoginController.js file which already created inside ./lib/controller folder.
  • Once you are done with your controller files, start server by running following command: node initserver.js .

[NOTE]: You can configure different port number from initserver.js file.

Enjoy

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » API architecture on NODE

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址