ferb

0.0.2 • Public • Published

What is this?

A simple package that makes it a breeze to get a Node.js server up and running. It uses express v4.0 internally to create a server object and returns it.

How do I use it?

Once you have the package installed, you can run a simple server using the code below:

var s = server();

 // Handle a GET request
 s.get("/", function(req, res) {
     res.json({
	      message: "You got me!"
	  });
 });

 // Handle a POST request
 s.post("/", function(req, res) {
     console.log(req.body);
	 res.json({});
});

s.listen(3000);

License

(C) Uday K Verma 2014, MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i ferb

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • verma