Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julianalonso/nylex.js
Node.js Framework, easy, simple and useful to make APIs, Angular.js pages, etc
https://github.com/julianalonso/nylex.js
Last synced: about 2 months ago
JSON representation
Node.js Framework, easy, simple and useful to make APIs, Angular.js pages, etc
- Host: GitHub
- URL: https://github.com/julianalonso/nylex.js
- Owner: JulianAlonso
- Created: 2014-06-26T12:11:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-09T14:02:59.000Z (over 10 years ago)
- Last Synced: 2024-11-04T09:38:23.576Z (2 months ago)
- Language: JavaScript
- Size: 543 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
NILEX.js
========Node.js framework to build Restful APIs, Angular.js pages...
## Example of server.js
var nylex = require('nylex')
var exampleController = require('/path/to/controller')
//first route to mount the controller, second the controller.
nylex.mount("/", exampleController)
//Start the server
nylex.start(8080);
## Example of simple controllervar Controller = require('nylex-controller')
var exampleController = new Controller();
exampleController.get("/", function(req, res) {
res.send("Hello World!");
});
module.exports = exampleController;## Installation
$ npm install nylex nylex-controller
## Simple usage
* Use verbs to route (GET, POST, PUT, DELETE);
* Use vars in the routes ("/example/route/:example_id")
* Get post, put and delete data in a simple way ( var exampleVar = req.body.exampleVar)
## Viewing a restful example with MongoDB
$ git clone https://github.com/JulianAlonso/Nylex.js-ExampleWithMongoDB.gitTo run the example you need to be root, if you want you can change the port defined in index.js
## License
MIT